Skip to content

Commit

Permalink
Add capability to set loglevel to trace during runtime (#655)
Browse files Browse the repository at this point in the history
Signed-off-by: Arpad Kiss <arpad.a.kiss@est.tech>
  • Loading branch information
arp-est authored Oct 14, 2024
1 parent c8d54f7 commit 07b797a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 07b797a

Please sign in to comment.