From 850ad6b9ff8f1a21517a382fe22efe5735805e30 Mon Sep 17 00:00:00 2001 From: Arpad Kiss Date: Wed, 9 Oct 2024 14:34:19 +0200 Subject: [PATCH] Add capability to set loglevel to trace during runtime Signed-off-by: Arpad Kiss --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index dc04462..aae6db8 100644 --- a/main.go +++ b/main.go @@ -118,6 +118,11 @@ func main() { 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() { collectorAddress := config.OpenTelemetryEndpoint