From a7821f3a2a86172c02a04aca1b1d454dd08c84f0 Mon Sep 17 00:00:00 2001 From: Arpad Kiss Date: Wed, 9 Oct 2024 15:31:39 +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 f78cd62..dc6acd2 100644 --- a/main.go +++ b/main.go @@ -100,6 +100,10 @@ func main() { logrus.Fatalf("invalid log level %s", conf.LogLevel) } logrus.SetLevel(level) + logruslogger.SetupLevelChangeOnSignal(ctx, map[os.Signal]logrus.Level{ + syscall.SIGUSR1: logrus.TraceLevel, + syscall.SIGUSR2: level, + }) // ******************************************************************************** // Configure Open Telemetry