Documentation
¶
Index ¶
Constants ¶
const ( LevelDebug = Level(slog.LevelDebug) LevelInfo = Level(slog.LevelInfo) LevelWarn = Level(slog.LevelWarn) LevelError = Level(slog.LevelError) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Format ¶
type Format int
Format represents a log output format.
func (*Format) Set ¶
Set updates the value of a Format variable.
Implements the pflag.Value interface.
func (Format) String ¶
String returns the string representation of a log format.
Implements the fmt.Stringer and pflag.Value interfaces.
func (Format) Type ¶
Type returns the string type of a log format.
Implements the pflag.Value interface.
func (*Format) UnmarshalText ¶
UnmarshalText decodes the text representation of a log format.
Implements the encoding.TextUnmarshaler interface used by mapstructure and viper.
type Level ¶
Level represents a log level threshold.
func (Level) Level ¶
Level returns the slog.Level value of a Level.
Implements the slog.Leveler interface.
func (*Level) Set ¶
Set updates the value of a Level variable.
Implements the pflag.Value interface.
func (Level) String ¶
String returns the string representation of a log level.
Implements the fmt.Stringer and pflag.Value interfaces.
func (Level) Type ¶
Type returns the string type of a log level.
Implements the pflag.Value interface.
func (*Level) UnmarshalText ¶
UnmarshalText decodes the text representation of a log level.
Implements the encoding.TextUnmarshaler interface used by mapstructure and viper.