Documentation
¶
Index ¶
- Variables
- func D(format string, a ...interface{})
- func DisableColor(set bool)
- func E(format string, a ...interface{})
- func F(format string, a ...interface{})
- func ForceFullColor(set bool)
- func I(format string, a ...interface{})
- func P(format string, a ...interface{})
- func SetLevel(level Level)
- func T(format string, a ...interface{})
- func W(format string, a ...interface{})
- type Level
- type LogComposition
Constants ¶
This section is empty.
Variables ¶
var AllLevels = []Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, TraceLevel, }
AllLevels A constant exposing all logging levels
Functions ¶
func ForceFullColor ¶
func ForceFullColor(set bool)
ForceFullColor allow user to force color on the entire log
Types ¶
type Level ¶
type Level uint32
Level type
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel Level = iota //Handle auto incrementation for interger comparison // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel TraceLevel )
These are the different logging levels. You can set the logging level to log on your instance of logger, obtained with `logrz.New()`.
func ParseLevel ¶
ParseLevel takes a string level and returns the logrz log level constant.