Skip to content

Commit

Permalink
Add capability to set loglevel to trace during runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Arpad Kiss <[email protected]>
  • Loading branch information
arp-est committed Oct 11, 2024
1 parent f768aac commit ba8041b
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 @@ -153,6 +153,10 @@ func main() {
logrus.Fatalf("invalid log level %s", config.LogLevel)
}
logrus.SetLevel(level)
logruslogger.SetupLevelChangeOnSignal(ctx, map[os.Signal]logrus.Level{
syscall.SIGUSR1: logrus.TraceLevel,
syscall.SIGUSR2: level,
})

log.FromContext(ctx).Infof("Config: %#v", config)

Expand Down

0 comments on commit ba8041b

Please sign in to comment.