Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func NewLogger(filePath string, level zapcore.Level, maxSize int, maxBackups int, maxAge int, ...) *zap.Logger
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func SetLogs(logLevel zapcore.Level, logFormat, fileName string)
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type Level
Constants ¶
View Source
const ( // logFormat LOGFORMAT_JSON = "json" LOGFORMAT_CONSOLE = "console" // EncoderConfig TIME_KEY = "time" LEVLE_KEY = "level" NAME_KEY = "logger" CALLER_KEY = "caller" MESSAGE_KEY = "msg" STACKTRACE_KEY = "stacktrace" // 日志归档配置项 // 每个日志文件保存的最大尺寸 单位:M MAX_SIZE = 50 // 文件最多保存多少天 MAX_BACKUPS = 5 // 日志文件最多保存多少个备份 MAX_AGE = 7 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.