Skip to content

Commit

Permalink
fix: panic when log level is not defined (#3639)
Browse files Browse the repository at this point in the history
fix panic when log level is not defined
  • Loading branch information
mathnogueira committed Feb 14, 2024
1 parent 2d99c76 commit 2f895b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/runner/runstrategy_dashboard.go
Expand Up @@ -44,6 +44,11 @@ func (s *Runner) RunDashboardStrategy(ctx context.Context, cfg agentConfig.Confi
}

func (s *Runner) disableLogger() func() {
if s.loggerLevel == nil {
// logger is not active, so it's safe to do nothing
return func() {}
}

oldLevel := s.loggerLevel.Level()
s.loggerLevel.SetLevel(zap.PanicLevel)

Expand Down

0 comments on commit 2f895b0

Please sign in to comment.