Added newlines to logger.New

This commit is contained in:
Scott 2020-01-22 15:36:20 +10:30
parent 9d2fd53335
commit 93f7d5849e
1 changed files with 13 additions and 9 deletions

View File

@ -167,15 +167,19 @@ func handleFlags() config.Config {
}
netLogger = netlogger.New()
log = logger.New(cfg.LogLevel, io.MultiWriter(
&lumberjack.Logger{
Filename: filepath.Join(*logPathPtr, "netsender.log"),
MaxSize: 500, // MB
MaxBackups: 10,
MaxAge: 28, // days
},
netLogger,
), true)
log = logger.New(
cfg.LogLevel,
io.MultiWriter(
&lumberjack.Logger{
Filename: filepath.Join(*logPathPtr, "netsender.log"),
MaxSize: 500, // MB
MaxBackups: 10,
MaxAge: 28, // days
},
netLogger,
),
true,
)
cfg.Logger = log