common/loggers: Make sure the global logger also gets colored labels

See #4414
This commit is contained in:
Bjørn Erik Pedersen
2018-10-28 16:06:50 +01:00
parent 95e72f5e8e
commit 9c88a8a55a
4 changed files with 24 additions and 7 deletions

View File

@@ -162,10 +162,7 @@ func (c *commandeer) createLogger(cfg config.Provider, running bool) (*loggers.L
}
}
// The global logger is used in some few cases.
jww.SetLogOutput(logHandle)
jww.SetLogThreshold(logThreshold)
jww.SetStdoutThreshold(stdoutThreshold)
loggers.InitGlobalLogger(stdoutThreshold, logThreshold, outHandle, logHandle)
helpers.InitLoggers()
return loggers.NewLogger(stdoutThreshold, logThreshold, outHandle, logHandle, running), nil