From e820dc16c87c2f6094427cc57a10e67d3dba8ab8 Mon Sep 17 00:00:00 2001 From: Arpad Kiss Date: Wed, 9 Oct 2024 19:30:09 +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 c3ddbb9..12d6436 100644 --- a/main.go +++ b/main.go @@ -228,6 +228,10 @@ func main() { } logrus.SetLevel(level) logrus.SetFormatter(&nested.Formatter{}) + logruslogger.SetupLevelChangeOnSignal(ctx, map[os.Signal]logrus.Level{ + syscall.SIGUSR1: logrus.TraceLevel, + syscall.SIGUSR2: level, + }) config.dnsServerAddrCh = make(chan net.IP, 1)