mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
commands, helpers: Add correct verbose log level to the global loggers
We still use those in some cases.
This commit is contained in:
parent
0802f79e66
commit
04d80e6e87
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue