Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Level ¶
type Level int
Level defines the logging level type
const ( // None is no logging None Level = iota // Trace logs verbose details and, really should be metricss Trace // Debug logs Debug and above Debug // Info logs Info and above Info // Warn logs Warn and above Warn // Error logs Error and above Error )
Log level controls the logging threshold, which log statements will be output. For example, Debug level will not output Trace statements, but will output Debug, Info, and the rest.
func Default ¶
func Default() Level
Default returns the default log level LOG_LEVEL env var overrides the default of Info
func FromString ¶
FromString converts the string representation of level into its const It does a case-insensitive comparison Invalid level string returns -1
Click to show internal directories.
Click to hide internal directories.