From 07b797a2705b0ea09bbfa2f250aee621d88265ac Mon Sep 17 00:00:00 2001 From: Arpad Kiss <158226216+arp-est@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:08:28 +0200 Subject: [PATCH] Add capability to set loglevel to trace during runtime (#655) Signed-off-by: Arpad Kiss --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 65d0dd7..9d424ad 100644 --- a/main.go +++ b/main.go @@ -114,6 +114,10 @@ func main() { logrus.Fatalf("invalid log level %s", c.LogLevel) } logrus.SetLevel(level) + logruslogger.SetupLevelChangeOnSignal(ctx, map[os.Signal]logrus.Level{ + syscall.SIGUSR1: logrus.TraceLevel, + syscall.SIGUSR2: level, + }) logger.Infof("rootConf: %+v", c)