Open nurlybekovnt opened 5 years ago
This library is great: https://github.com/natefinch/lumberjack.
fileBackend := logging.NewLogBackend(&lumberjack.Logger{
Filename: "./logs/log.log",
MaxSize: 2, // megabytes
Compress: true, // disabled by default
}, "", 0)
logging.SetBackend(stdBackendLeveled, mqttBackend, fileBackend)
Hi, thanks a lot for that great implementation of logger How and where can I add file rotationg(every day)? I want to hold logs for every single day in separate files, and I think it would be better if I implement this using goroutines