Documentation
¶
Index ¶
- Variables
- func Colorize(s string, c int, color bool) string
- type Level
- func (l Level) Color() int
- func (l Level) ColorString(color, short bool) string
- func (l Level) Level() slog.Level
- func (l Level) MarshalJSON() ([]byte, error)
- func (l Level) MarshalText() (bs []byte, err error)
- func (l Level) ShortString() string
- func (l Level) String() string
- func (l *Level) UnmarshalJSON(bs []byte) error
- func (l *Level) UnmarshalText(bs []byte) error
- type Leveler
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = map[Level]int{
Debug: 0,
Info: colorGreen,
Warn: colorYellow,
Error: colorRed,
Fatal: colorRed,
}
Functions ¶
Types ¶
type Level ¶
type Level int
func (Level) ColorString ¶
func (Level) MarshalJSON ¶
func (Level) MarshalText ¶
func (Level) ShortString ¶
func (*Level) UnmarshalJSON ¶
func (*Level) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.