Documentation
¶
Index ¶
Constants ¶
View Source
const ( // FormatJSON encodes logs as JSON to stdout. FormatJSON = "json" // LevelDebug enables debug and above. LevelDebug = "debug" // LevelInfo enables info and above. LevelInfo = "info" // LevelWarning enables warning and error only. LevelWarning = "warning" // LevelError enables error only. LevelError = "error" )
Supported logger formats and levels.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Format selects encoder. When set to "json" logs are emitted as JSON to
// stdout; any other value uses logfmt to stderr.
Format string
// Level selects the minimum level to log. Valid values are
// "debug", "info", "warning", or "error".
Level string
}
Config declares runtime logging preferences.
Click to show internal directories.
Click to hide internal directories.