Documentation
¶
Index ¶
- func Debugf(format string, args ...any)
- func Errorf(format string, args ...any)
- func Fatalf(format string, args ...any)
- func Infof(format string, args ...any)
- func Init(cfg Config)
- func Panicf(format string, args ...any)
- func Warnf(format string, args ...any)
- type Config
- type Field
- func Any(key string, val any) Field
- func Bool(key string, val bool) Field
- func Float32(key string, val float32) Field
- func Float64(key string, val float64) Field
- func Int(key string, val int) Field
- func Int16(key string, val int16) Field
- func Int32(key string, val int32) Field
- func Int64(key string, val int64) Field
- func Int8(key string, val int8) Field
- func String(key, val string) Field
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // 控制台输出 EnableConsole bool `mapstructure:"enable-console"` ConsoleJsonFormat bool `mapstructure:"console-json-format"` ConsoleLevel string `mapstructure:"console-level"` // 文件输出 EnableFile bool `mapstructure:"enable-file"` FileJsonFormat bool `mapstructure:"file-json-format"` FileLevel string `mapstructure:"file-level"` FileLocation string `mapstructure:"file-location"` MaxAge int `mapstructure:"max-age"` // 保留文件数量 MaxSize int `mapstructure:"max-size"` // 单文件最大size Compress bool `mapstructure:"compress"` // 是否压缩 FileExport string `mapstructure:"file-export"` // 日志备份目录 }
Click to show internal directories.
Click to hide internal directories.