Skip to content

Commit

Permalink
Add capability to set loglevel to trace during runtime (#689)
Browse files Browse the repository at this point in the history
Signed-off-by: Arpad Kiss <[email protected]>
  • Loading branch information
arp-est authored Oct 14, 2024
1 parent 8c0fbce commit dc1e552
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 @@ -112,6 +112,11 @@ func main() {

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

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

// Configure Open Telemetry
if opentelemetry.IsEnabled() {
collectorAddress := config.OpenTelemetryEndpoint
Expand Down

0 comments on commit dc1e552

Please sign in to comment.