feat: adjust log file rotation

This commit is contained in:
SunBK201 2025-11-01 01:33:25 +08:00
parent f7085fd2df
commit bd61e2c239

View File

@ -34,9 +34,9 @@ func SetLogConf(level string) {
writer2 := os.Stdout writer2 := os.Stdout
writer3 := &lumberjack.Logger{ writer3 := &lumberjack.Logger{
Filename: log_file, Filename: log_file,
MaxSize: 2, // megabytes MaxSize: 1, // megabytes
MaxBackups: 3, MaxBackups: 5,
MaxAge: 15, //days MaxAge: 7, //days
LocalTime: true, LocalTime: true,
Compress: true, Compress: true,
} }