Set 200mb as max single session log size
This commit is contained in:
@@ -55,8 +55,9 @@ func NewLogger(logPath string) *Logger {
|
|||||||
|
|
||||||
// Set up file logging with overwrite mode
|
// Set up file logging with overwrite mode
|
||||||
logFile := zapcore.AddSync(&lumberjack.Logger{
|
logFile := zapcore.AddSync(&lumberjack.Logger{
|
||||||
Filename: logPath,
|
Filename: logPath,
|
||||||
MaxSize: 10, // megabytes
|
MaxSize: 10, // megabytes
|
||||||
|
MaxBackups: 20,
|
||||||
})
|
})
|
||||||
fmt.Println("Logging to", logPath)
|
fmt.Println("Logging to", logPath)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user