Documentation
¶
Index ¶
- Variables
- func GetAllLevels() map[string]Level
- func HideCallerInfo(module string, level Level)
- func IsCallerInfoEnabled(module string, level Level) bool
- func IsEnabledFor(module string, level Level) bool
- func ParseString(level Level) string
- func SetLevel(module string, level Level)
- func ShowCallerInfo(module string, level Level)
- type Level
Constants ¶
This section is empty.
Variables ¶
var Levels = []string{
"CRITICAL",
"ERROR",
"WARNING",
"INFO",
"DEBUG",
}
Levels are the log levels supported.
Functions ¶
func HideCallerInfo ¶
HideCallerInfo - Do not show caller info in log lines for given log level and module.
func IsCallerInfoEnabled ¶
IsCallerInfoEnabled - returns if caller info enabled for given log level and module.
func IsEnabledFor ¶
IsEnabledFor - Check if given log level is enabled for given module.
func ParseString ¶
ParseString returns string representation of given log level.
func ShowCallerInfo ¶
ShowCallerInfo - Show caller info in log lines for given log level and module.
Types ¶
type Level ¶
type Level int
Level defines all available log levels for logging messages.
Log levels. note: below constants are copy of 'log.Level' constants added to avoid circular references, care should be taken before changing below constants including their order. For any updates in level constants below, corresponding changes has to be done for constants in 'log.Level'.
func ParseLevel ¶
ParseLevel returns the log level from a string representation.