format log
This commit is contained in:
parent
93d77d4d38
commit
de99272b07
@ -68,7 +68,7 @@ func NewLogger(loggerLevel zapcore.Level, splitConfig *RotateLogConfig, optionFu
|
||||
core := zapcore.NewTee(fileHandlerList...)
|
||||
|
||||
// 需要传入 zap.AddCaller() 才会显示打日志点的文件名和行数, 跳过一行可以直接显示业务代码行号,否则显示日志包行号
|
||||
logConfList := []zap.Option{}
|
||||
logConfList := make([]zap.Option, 0)
|
||||
if o.WithCaller {
|
||||
logConfList = append(logConfList, zap.AddCaller(), zap.AddCallerSkip(o.WithCallerSkip))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user