update file

This commit is contained in:
C菌
2022-04-28 20:40:16 +08:00
parent f810b7bc91
commit 93f354370a
13 changed files with 75 additions and 132 deletions

View File

@@ -85,11 +85,11 @@ func getConsoleEncoder() zapcore.Encoder {
func getFileWriter(c config.Rotate) zapcore.WriteSyncer {
logger := &lumberjack.Logger{
Filename: c.Filename,
MaxSize: c.MaxSize,
MaxAge: c.MaxAge,
MaxBackups: c.MaxBackups,
LocalTime: c.LocalTime,
Compress: c.Compress,
MaxSize: c.MaxSize, //Mb
MaxAge: c.MaxAge, //days
MaxBackups: c.MaxBackups, //int backup maximum number of old log files
LocalTime: c.LocalTime, //bool backup files is the computer's local time
Compress: c.Compress, //bool
}
return zapcore.AddSync(logger)
}