Skip to content

Commit

Permalink
fix: exit directly in debugPrintProcessor when log doesn't have debug…
Browse files Browse the repository at this point in the history
… level enabled (#40081) (#40124)

(cherry picked from commit 58f4fc8)

Co-authored-by: Panos Koutsovasilis <[email protected]>
  • Loading branch information
mergify[bot] and pkoutsovasilis authored Jul 5, 2024
1 parent 6676b33 commit 6e97683
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libbeat/publisher/processing/processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ func debugPrintProcessor(info beat.Info, log *logp.Logger) *processorFn {
EscapeHTML: false,
})
return newProcessor("debugPrint", func(event *beat.Event) (*beat.Event, error) {
if !log.IsDebug() {
return event, nil
}

mux.Lock()
defer mux.Unlock()

Expand Down

0 comments on commit 6e97683

Please sign in to comment.