Color Logging - pd93/plog GitHub Wiki

Colored logging is enabled by default when the logger's output is set to os.Stdout. This can be disabled by using:

logger.SetColoredLogging(false)

It can also be enabled for non os.Stdout outputs by passing true instead. For your convenience, there is also a global function which will enable/disable color logging on all loggers:

log.SetColoredLogging(false)

Default colors

LogLevel Color
FatalLevel Red
ErrorLevel Red
WarnLevel Yellow
InfoLevel Green
DebugLevel Cyan
TraceLevel Blue

Using custom colors

Coming soon! (see #3)