From de99272b07a3ff53ee49992aeedc73888ef717c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BE=B7=E6=BB=A1?= Date: Sat, 6 Mar 2021 14:16:09 +0800 Subject: [PATCH] format log --- logger/logger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logger/logger.go b/logger/logger.go index 84757c5..1958a45 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -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)) }