Add 10mb limit for log rotation
This commit is contained in:
@@ -56,6 +56,7 @@ 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
|
||||||
})
|
})
|
||||||
fmt.Println("Logging to", logPath)
|
fmt.Println("Logging to", logPath)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user