Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultZapConfig = Zap{ Directory: "logs", MaxSize: 10, MaxAge: 30, MaxBackups: 10, Compress: true, Level: "info", Format: "json", ShowLine: false, EncodeLevel: "CapitalColorLevelEncoder", StacktraceKey: "", LogInConsole: true, }
Functions ¶
This section is empty.
Types ¶
type Zap ¶
type Zap struct {
Directory string `mapstructure:"directory" json:"directory" yaml:"directory"`
MaxSize int `mapstructure:"max_size" json:"max_size" yaml:"max_size"`
MaxAge int `mapstructure:"max_age" json:"max_age" yaml:"max_age"`
MaxBackups int `mapstructure:"max_backups" json:"max_backups" yaml:"max_backups"`
Compress bool `mapstructure:"compress" json:"compress" yaml:"compress"`
Level string `mapstructure:"level" json:"level" yaml:"level"` // debug info warn error
Format string `mapstructure:"format" json:"format" yaml:"format"`
EncodeLevel string `mapstructure:"encode_level" json:"encode_level" yaml:"encode_level"`
StacktraceKey string `mapstructure:"stacktrace_key" json:"stacktrace_key" yaml:"stacktrace_key"`
LogInConsole bool `mapstructure:"log_in_console" json:"log_in_console" yaml:"log_in_console"`
ShowLine bool `mapstructure:"show_line" json:"show_line" yaml:"show_line"`
}
func (*Zap) ZapEncodeLevel ¶
func (z *Zap) ZapEncodeLevel() zapcore.LevelEncoder
Click to show internal directories.
Click to hide internal directories.