mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
commands, helpers: Add correct verbose log level to the global loggers
We still use those in some cases.
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user