Skip to content
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

Add check for global filtering levels in Log::enabled() impl #53

Merged
merged 2 commits into from
Dec 5, 2021

Conversation

inejge
Copy link
Contributor

@inejge inejge commented Jul 31, 2020

The check mimics the ones used by the log!() macro.

The enabled() function is used by the log_enabled!() macro. I stumbled over this when activating logging for a hyper server, which uses its own tracing framework. If enabled() always returns true, hyper will happily spam syslog with trace-level messages despite the filtering having been initialized in syslog::init_unix() or equivalent.

@Geal Geal merged commit f488cbf into Geal:master Dec 5, 2021
@Geal
Copy link
Owner

Geal commented Dec 5, 2021

nice catch, thanks

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.

2 participants