From de41b1e9ac8778e12ba9234167453f6332cfd841 Mon Sep 17 00:00:00 2001 From: Arpad Kiss Date: Wed, 9 Oct 2024 15:29:57 +0200 Subject: [PATCH] Add capability to set loglevel to trace during runtime Signed-off-by: Arpad Kiss --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index c4f5c74..7c0358c 100644 --- a/main.go +++ b/main.go @@ -115,6 +115,10 @@ func main() { } logrus.SetLevel(l) log.FromContext(ctx).Infof("Config: %#v", config) + logruslogger.SetupLevelChangeOnSignal(ctx, map[os.Signal]logrus.Level{ + syscall.SIGUSR1: logrus.TraceLevel, + syscall.SIGUSR2: l, + }) // Configure Open Telemetry if opentelemetry.IsEnabled() {