Documentation
¶
Index ¶
- Constants
- func WithOutputFile(format LogFormat, dir string) func(l *Logger)
- func WithOutputFunc(format LogFormat, fc func(line string)) func(l *Logger)
- func WithOutputStd() func(l *Logger)
- type KeyValue
- func Any(key string, value any) KeyValue
- func Bool(key string, value bool) KeyValue
- func Float32(key string, value float32) KeyValue
- func Float64(key string, value float64) KeyValue
- func Int(key string, value int) KeyValue
- func Int16(key string, value int16) KeyValue
- func Int32(key string, value int32) KeyValue
- func Int64(key string, value int64) KeyValue
- func Int8(key string, value int8) KeyValue
- func String(key string, value string) KeyValue
- func Uint(key string, value uint) KeyValue
- func Uint16(key string, value uint16) KeyValue
- func Uint32(key string, value uint32) KeyValue
- func Uint64(key string, value uint64) KeyValue
- func Uint8(key string, value uint8) KeyValue
- type Line
- type LogFormat
- type Logger
- func (l *Logger) Close()
- func (l *Logger) Debug(msg string, fields ...KeyValue)
- func (l *Logger) Error(err error, fields ...KeyValue)
- func (l *Logger) Info(msg string, fields ...KeyValue)
- func (l *Logger) Raw(msg string)
- func (l *Logger) Request(msg string, fields ...KeyValue)
- func (l *Logger) Warn(msg string, fields ...KeyValue)
- type Output
- type OutputFile
- type OutputFunc
- type OutputStd
- type Tag
Constants ¶
View Source
const ( LogFormatText = iota LogFormatJson LogFormatColoredText )
Variables ¶
This section is empty.
Functions ¶
func WithOutputFile ¶
func WithOutputFunc ¶ added in v1.0.3
func WithOutputStd ¶
func WithOutputStd() func(l *Logger)
Types ¶
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
func (*Line) ToColoredText ¶ added in v1.0.3
type OutputFile ¶
type OutputFile struct {
// contains filtered or unexported fields
}
type OutputFunc ¶ added in v1.0.3
type OutputFunc struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.