Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize() error
Initialize initializes the global Logrus logger, reading the desired log level from the viper store, or using a default if the level has not been set in viper.
It also sets the output to log.SplitErrOutputs(...) so you get error logs on stderr and normal logs on stdout.
If syslog settings are also in viper, then Syslog will be initialized as well.
Types ¶
type OutputSplitFunc ¶ added in v0.3.3
OutputSplitFunc implements the io.Writer interface for use with Logrus, and simply splits logs between stdout and stderr depending on their severity.
func SplitErrOutputs ¶ added in v0.3.3
func SplitErrOutputs(out, err io.Writer) OutputSplitFunc
SplitErrOutputs returns an OutputSplitFunc that splits output to either one of two given outputs depending on whether the level is "error","fatal","panic".