Skip to content

Commit

Permalink
update: 日志参数
Browse files Browse the repository at this point in the history
  • Loading branch information
qingchuwudi committed Dec 12, 2021
1 parent 30d0397 commit 59f2d32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions module/loger/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ func InitLogger(logPath, filename string) {

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

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

0 comments on commit 59f2d32

Please sign in to comment.