From 7ec9b34d33c08fdf340420c1096fc54c6e918292 Mon Sep 17 00:00:00 2001 From: Artem Tataurov Date: Fri, 16 Feb 2024 17:50:46 +0300 Subject: [PATCH] [#105] logger: Fix logging level changing for journald Signed-off-by: Artem Tataurov --- cmd/http-gw/settings.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/http-gw/settings.go b/cmd/http-gw/settings.go index 045a118..a38ebc5 100644 --- a/cmd/http-gw/settings.go +++ b/cmd/http-gw/settings.go @@ -423,7 +423,7 @@ func newJournaldLogger(lvl zapcore.Level) (*zap.Logger, zap.AtomicLevel) { encoder := zapjournald.NewPartialEncoder(zapcore.NewConsoleEncoder(c.EncoderConfig), zapjournald.SyslogFields) - core := zapjournald.NewCore(zap.NewAtomicLevelAt(lvl), encoder, &journald.Journal{}, zapjournald.SyslogFields) + core := zapjournald.NewCore(c.Level, encoder, &journald.Journal{}, zapjournald.SyslogFields) coreWithContext := core.With([]zapcore.Field{ zapjournald.SyslogFacility(zapjournald.LogDaemon), zapjournald.SyslogIdentifier(),