diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-10-31 09:25:28 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-10-31 10:42:23 +0100 |
commit | ab21433689093a87db68666845d736ad492a056f (patch) | |
tree | 70828119c97f18143b41aa8bc904a2d889bf16c6 /common | |
parent | 23fcfb7f741a417f53a8ef4997bb68e64631df01 (diff) | |
download | hugo-ab21433689093a87db68666845d736ad492a056f.tar.gz hugo-ab21433689093a87db68666845d736ad492a056f.zip |
Fix deprecation printing on info level
Fixes #11638
Diffstat (limited to 'common')
-rw-r--r-- | common/loggers/loggerglobal.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/loggers/loggerglobal.go b/common/loggers/loggerglobal.go index 92b2469ba..8b8e8cfc2 100644 --- a/common/loggers/loggerglobal.go +++ b/common/loggers/loggerglobal.go @@ -21,7 +21,7 @@ import ( "github.com/bep/logg" ) -func InitGlobalLogger(panicOnWarnings bool) { +func InitGlobalLogger(level logg.Level, panicOnWarnings bool) { logMu.Lock() defer logMu.Unlock() var logHookLast func(e *logg.Entry) error @@ -31,6 +31,7 @@ func InitGlobalLogger(panicOnWarnings bool) { log = New( Options{ + Level: level, Distinct: true, HandlerPost: logHookLast, }, @@ -49,5 +50,5 @@ func Log() Logger { var log Logger func init() { - InitGlobalLogger(false) + InitGlobalLogger(logg.LevelWarn, false) } |