commands, helpers: Add correct verbose log level to the global loggers

We still use those in some cases.
This commit is contained in:
Bjørn Erik Pedersen 2017-04-04 11:02:12 +02:00
parent 0802f79e66
commit 04d80e6e87
2 changed files with 9 additions and 1 deletions

View file

@ -436,6 +436,12 @@ func createLogger(cfg config.Provider) (*jww.Notepad, error) {
logThreshold = jww.LevelInfo
}
// The global logger is used in some few cases.
jww.SetLogOutput(logHandle)
jww.SetLogThreshold(logThreshold)
jww.SetStdoutThreshold(stdoutThreshold)
helpers.InitLoggers()
return jww.NewNotepad(stdoutThreshold, logThreshold, outHandle, logHandle, "", log.Ldate|log.Ltime), nil
}

View file

@ -274,7 +274,9 @@ var (
// InitLoggers sets up the global distinct loggers.
func InitLoggers() {
jww.ResetLogCounters()
DistinctErrorLog = NewDistinctErrorLogger()
DistinctWarnLog = NewDistinctWarnLogger()
DistinctFeedbackLog = NewDistinctFeedbackLogger()
}
// Deprecated informs about a deprecation, but only once for a given set of arguments' values.