Documentation ¶
Index ¶
Constants ¶
View Source
const ( LogHookTypeKey = "type" LogHookLevelsKey = "levels" LogHookConfigKey = "config" LogHookMailApplicationNameKey = "application_name" LogHookMailHostKey = "host" LogHookMailPortKey = "port" LogHookMailFromKey = "from" LogHookMailToKey = "to" LogHookMailUsernameKey = "username" LogHookMailPasswordKey = "password" )
View Source
const ( LogLevelKey = "level" LogTimezoneKey = "timezone" LogFormatterKey = "formatter" LogOutputKey = "output" LogHooksKey = "hooks" LogFormatterTypeKey = "type" LogFormatterTimezoneKey = "timezone" LogFormatterTimestampFormat = "timestamp_format" LogOutputTypeKey = "type" LogOutputFileFilePatternKey = "file_pattern" LogOutputFileCurrentLinkKey = "current_link" LogOutputFileClockTimezoneKey = "clock_timezone" LogOutputFileRotationTimeInSecKey = "rotation_time_in_sec" LogOutputFileMaxAgeInSecKey = "max_age_in_sec" LogOutputFileRotationCountKey = "rotation_count" )
Logger configuration keys
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
InitLogger initializes logger using configuration provided by viper instance.
Function designed to configure few different loggers with different formatter and output settings. To achieve this viper configuration contains separate sections for each logger, each output and each formatter.
Types ¶
type Hook ¶
type Hook struct { // Delegate keeps logrus hook pointer to call on message. Delegate log.Hook // ExitHandler is a function to be called before terminating application // when logrus.Fatal() method was called. ExitHandler func() }
Hook is a structure to return new log message hooks instances from factory method.
Click to show internal directories.
Click to hide internal directories.