Skip to content

Allow skipping of appenders when demoting log level via middleware #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DerGuteMoritz
Copy link
Contributor

@DerGuteMoritz DerGuteMoritz commented Aug 12, 2025

When a middleware demotes a log's :level below an appender's :min-level, that appender will now be skipped. This behavior is consistent with e.g. :msg_ which was already exposed to the changed log level.

Review notes

  • The patch also affects the calculation of :hash_. I'm not 100% sure whether this makes sense.
  • The test assertion violates the formatting symmetry relative to the other assertions. Given how much longer it is, it felt a bit off to re-indent all others to match but if you prefer it, I'm happy to adjust.
  • Not sure whether the levels test is the best place for the assertion but it seemed like a good fit to me.

When a middleware demotes a log's `:level` below an appender's `:min-level`, that appender will now
be skipped. This behavior is consistent with e.g. `:msg_` which was already exposed to the changed
log level.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant