Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddContext ¶
AddContext will return a copy of the logger with extra context added
func GetLogger ¶
func GetLogger(syslog string, logfile string, verbose bool, debug bool, customHandler log.Handler) (logger.Logger, error)
GetLogger returns a logger suitable for using as logger.Log.
func LogfmtFormat ¶
LogfmtFormat return a formatter for a text log file
func TerminalFormat ¶
TerminalFormat formats log records optimized for human readability on a terminal with color-coded level output and terser human friendly timestamp. This format should only be used for interactive programs or while developing.
[TIME] [LEVEL] MESAGE key=value key=value ...
Example:
[May 16 20:58:45] [DBUG] remove route ns=haproxy addr=127.0.0.1:50002
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.