mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Set global zerologger
This commit is contained in:
parent
58a7323f0a
commit
4e423897f7
1 changed files with 2 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ import (
|
|||
|
||||
"github.com/mattn/go-sqlite3"
|
||||
"github.com/rs/zerolog"
|
||||
deflog "github.com/rs/zerolog/log"
|
||||
"go.mau.fi/util/configupgrade"
|
||||
"go.mau.fi/util/dbutil"
|
||||
_ "go.mau.fi/util/dbutil/litestream"
|
||||
|
|
@ -505,6 +506,7 @@ func (br *Bridge) init() {
|
|||
zerolog.TimeFieldFormat = time.RFC3339Nano
|
||||
zerolog.CallerMarshalFunc = exzerolog.CallerWithFunctionName
|
||||
zerolog.DefaultContextLogger = &defaultCtxLog
|
||||
deflog.Logger = br.ZLog.With().Bool("global_log", true).Caller().Logger()
|
||||
br.Log = maulogadapt.ZeroAsMau(br.ZLog)
|
||||
|
||||
br.DoublePuppet = &doublePuppetUtil{br: br, log: br.ZLog.With().Str("component", "double puppet").Logger()}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue