Skip to content

Commit

Permalink
Update 4290-logger-enabled.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Jan 21, 2025
1 parent 84205c3 commit a298337
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions oteps/logs/4290-logger-enabled.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@ func (l *logger) Enabled(ctx context.Context, param EnabledParameters) bool {
return false
}

fltrs := l.provider.filterProcessors()
// If there are more Processors than FilterProcessors we cannot be sure
// that all Processors will drop the record. Therefore, return true.
//
// If all Processors are FilterProcessors, check if any is enabled.
return len(l.provider.processors) > len(fltrs) || anyEnabled(ctx, param, fltrs)
return len(l.provider.processors) > len(l.provider.fltrs) || anyEnabled(ctx, param, l.provider.fltrs))
}

func anyEnabled(ctx context.Context, param EnabledParameters, fltrs []FilterProcessor) bool {
Expand Down

0 comments on commit a298337

Please sign in to comment.