log+config: remove global RootLogWriter variable

This commit is contained in:
Oliver Gugger
2020-05-25 18:34:00 +02:00
parent 70772ab99b
commit 75f916b026
2 changed files with 93 additions and 69 deletions

View File

@@ -947,6 +947,7 @@ func ValidateConfig(cfg Config, usageMessage string) (*Config, error) {
}
// Initialize logging at the default logging level.
SetupLoggers(cfg.LogWriter)
err = cfg.LogWriter.InitLogRotator(
filepath.Join(cfg.LogDir, defaultLogFilename),
cfg.MaxLogFileSize, cfg.MaxLogFiles,