Add 10mb limit for log rotation

This commit is contained in:
Ben Sarmiento
2024-04-26 12:43:30 +02:00
parent c86b0fc910
commit f8b152dc76

View File

@@ -56,6 +56,7 @@ func NewLogger(logPath string) *Logger {
// Set up file logging with overwrite mode
logFile := zapcore.AddSync(&lumberjack.Logger{
Filename: logPath,
MaxSize: 10, // megabytes
})
fmt.Println("Logging to", logPath)