Skip to content

Commit

Permalink
enable logslevel change on signal
Browse files Browse the repository at this point in the history
Signed-off-by: denis-tingaikin <[email protected]>
  • Loading branch information
denis-tingaikin committed Oct 1, 2024
1 parent 80ac4df commit 57952a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ func main() {
}()
}

logruslogger.SetupLevelChangeOnSignal(ctx, map[os.Signal]logrus.Level{
syscall.SIGUSR1: logrus.TraceLevel,
syscall.SIGUSR2: level,
})

// Configure pprof
if cfg.PprofEnabled {
go pprofutils.ListenAndServe(ctx, cfg.PprofListenOn)
Expand Down

0 comments on commit 57952a0

Please sign in to comment.