Skip to content

Commit 59f2d32

Browse files
author
qingchuwudi
committed
update: 日志参数
1 parent 30d0397 commit 59f2d32

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

module/loger/log.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ func InitLogger(logPath, filename string) {
6767

6868
hook := lumberjack.Logger{
6969
Filename: logfile, // 日志文件路径
70-
MaxSize: 128, // 每个日志文件保存的大小 单位:M
70+
MaxSize: 16, // 每个日志文件保存的大小 单位:M
7171
MaxAge: 7, // 文件最多保存多少天
72-
MaxBackups: 30, // 日志文件最多保存多少个备份
73-
Compress: false, // 是否压缩
72+
MaxBackups: 10, // 日志文件最多保存多少个备份
73+
Compress: true, // 是否压缩
7474
}
7575

7676
var writes = []zapcore.WriteSyncer{zapcore.AddSync(&hook)}

0 commit comments

Comments
 (0)