Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Debug = logger.Debug Debugf = logger.Sugar().Debugf Info = logger.Info Infof = logger.Sugar().Infof Warn = logger.Warn Warnf = logger.Sugar().Warnf Error = logger.Error Errorf = logger.Sugar().Errorf DPanic = logger.DPanic DPanicf = logger.Sugar().DPanicf Panic = logger.Panic Panicf = logger.Sugar().Panicf Fatal = logger.Fatal Fatalf = logger.Sugar().Fatalf )
Functions ¶
func GetSLogger ¶
func GetSLogger() *zap.SugaredLogger
Types ¶
type Config ¶
type Config struct { // 时间格式 Format string `json:"format" yaml:"format"` // 日志格式,json和console Type string `json:"type" yaml:"type"` // 是否开通栈追踪,开启后error及以下级别打印栈信息 Stacktrace bool `json:"stacktrace" yaml:"stacktrace"` Development bool `json:"development" yaml:"development"` // 日志文件及级别配置 Appenders []appender `json:"appenders" yaml:"appenders"` }
日志配置
Click to show internal directories.
Click to hide internal directories.