Fix deprecation printing on info level

Fixes #11638
This commit is contained in:
Bjørn Erik Pedersen
2023-10-31 09:25:28 +01:00
parent 23fcfb7f74
commit ab21433689
5 changed files with 56 additions and 6 deletions

View File

@@ -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)
}