ref: 04d80e6e8725dd9d1ee76d7615ae312f995cd7bc
parent: 0802f79e666c7221e8b5580c9ccfbfb538a20b95
author: Bjørn Erik Pedersen <[email protected]>
date: Tue Apr 4 07:02:12 EDT 2017
commands, helpers: Add correct verbose log level to the global loggers We still use those in some cases.
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -436,6 +436,12 @@
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
}
--- a/helpers/general.go
+++ b/helpers/general.go
@@ -274,7 +274,9 @@
// 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.