aboutsummaryrefslogtreecommitdiffhomepage
path: root/common
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-10-31 09:25:28 +0100
committerBjørn Erik Pedersen <[email protected]>2023-10-31 10:42:23 +0100
commitab21433689093a87db68666845d736ad492a056f (patch)
tree70828119c97f18143b41aa8bc904a2d889bf16c6 /common
parent23fcfb7f741a417f53a8ef4997bb68e64631df01 (diff)
downloadhugo-ab21433689093a87db68666845d736ad492a056f.tar.gz
hugo-ab21433689093a87db68666845d736ad492a056f.zip
Fix deprecation printing on info level
Fixes #11638
Diffstat (limited to 'common')
-rw-r--r--common/loggers/loggerglobal.go5
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)
}