Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
Debug starts a new message with debug level.
You must call Msg on the returned event in order to send the event.
func Error ¶
Error starts a new message with error level.
You must call Msg on the returned event in order to send the event.
func Info ¶
Info starts a new message with info level.
You must call Msg on the returned event in order to send the event.
func Stop ¶
func Stop() error
Stop closes the underlying file logger. Should be called at the end of the service Stop method.
Types ¶
type Config ¶
type Config struct { // Level of the logger. Valid options: debug, info, warn, error, disable. Level string `yaml:"level"` // MaxSize is the maximum size in megabytes of the log file before it gets // rotated. It defaults to 100 megabytes. MaxSize int `yaml:"maxsize"` // MaxAge is the maximum number of days to retain old log files based on the // timestamp encoded in their filename. Note that a day is defined as 24 // hours and may not exactly correspond to calendar days due to daylight // savings, leap seconds, etc. The default is not to remove old log files // based on age. MaxAge int `yaml:"maxage"` // MaxBackups is the maximum number of old log files to retain. The default // is to retain all old log files (though MaxAge may still cause them to get // deleted.) MaxBackups int `yaml:"maxbackups"` // Compress determines if the rotated log files should be compressed // using gzip. Compress bool `yaml:"compress"` }
Click to show internal directories.
Click to hide internal directories.