Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type int
func FromDebug ¶
FromDebug returns the debug level type if debug argument is true, or the info level type if debug argument if false or missing. This facilitates setting the log level via config or environment variable by value in a predictable way. Example:
true => level.Debug false => level.Info <nothing> => level.Info
func FromString ¶
FromString returns a Level type for the named log level, or "Undef" if the level string is invalid. This facilitates setting the log level via config or environment variable by name in a predictable way. Example:
"debug" => level.Debug
The Level string argument `s` is NOT "case-sensitive", i.e.:
Accept both "INFO" and "info".
Click to show internal directories.
Click to hide internal directories.