Documentation
¶
Overview ¶
Package level provides a common definition of the severity of log or trace events. The advantage compared to numeric log levels as used in glog is that the severity is immediately obvious. The levels defined here are intentionally the same as in uber/zap and logrus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Threshold ¶
type Threshold int
Threshold defines the severity of a log or trace event. It satisfies the flag.Value interface and thus can be used like this: var t func init() { flag.Var(&t, "threshold", "")
const ( // Debug = relevant only for a developer during debugging. Debug Threshold = iota // Info = informational, may be useful also for users. Info // Warn = warning, may or may not be something that is worth investigating. Warn // Error = should not occur during normal operation, but the program can continue. Error // Fatal = an error that is so severe that the program needs to quit. Fatal // Panic = an error that is so severe that the program needs to abort. Panic // Min is the smallest threshold. Min = Debug // Max is the largest threshold. Max = Panic )
Click to show internal directories.
Click to hide internal directories.