Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownLevel = errors.New("unknown log level")
Functions ¶
func ToZapLevel ¶
ToZapLevel converts our Level to zapcore.Level
Types ¶
type Level ¶
type Level int8
Level represents a logging level Values are aligned with zapcore.Level for direct casting
const ( // Verbo is the most verbose level, below debug Verbo Level = -2 // Debug level (matches zapcore.DebugLevel = -1) Debug Level = -1 // Trace level (same as debug since zap doesn't have trace) Trace Level = -1 // Info level (matches zapcore.InfoLevel = 0) Info Level = 0 // Warn level (matches zapcore.WarnLevel = 1) Warn Level = 1 // Error level (matches zapcore.ErrorLevel = 2) Error Level = 2 // Fatal level (matches zapcore.FatalLevel = 5) Fatal Level = 5 // Off disables logging Off Level = 6 )
func FromZapLevel ¶
FromZapLevel converts zapcore.Level to our Level
func (Level) LowerString ¶
LowerString returns the lowercase string representation of a Level
func (Level) MarshalJSON ¶
MarshalJSON marshals the Level to JSON
func (*Level) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Level from JSON
Click to show internal directories.
Click to hide internal directories.