Currently, log processors always execute, even if their log level is lower than the currently set log level.
Consider the configuration below. If the current log level is not TRACE, I would not expect the mapping to execute.
input:
generate:
mapping: |
root = {}
pipeline:
processors:
- log:
level: TRACE
fields_mapping: |
root = throw("foo")
output:
stdout: {}
This would be a minor performance improvement, and matches how log formatting works in other languages (e.g. Python).
The log processor states that the message remains unchanged, so skipping its execution would have no effect on the pipeline.