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

Fix configuring loggers found in 'PREFECT_LOGGING_EXTRA_LOGGERS' #16652

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

estasney
Copy link
Contributor

@estasney estasney commented Jan 8, 2025

Each logger defined in 'PREFECT_LOGGING_EXTRA_LOGGERS' now has their level set according to the 'prefect.extra' level. Previously, this only occurred when their level was NOTSET.

Additionally, avoid configuring the logger 'level' and 'propagate' values while iterating over 'extra_config.handlers'

closes #15370

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

Each logger defined in 'PREFECT_LOGGING_EXTRA_LOGGERS' now has their level set according to the 'prefect.extra' level. Previously, this only occurred when their level was NOTSET.

Additionally, avoid configuring the logger 'level' and 'propagate' values while iterating over 'extra_config.handlers'

Resolves PrefectHQ#15370
@github-actions github-actions bot added the bug Something isn't working label Jan 8, 2025
Copy link

codspeed-hq bot commented Jan 8, 2025

CodSpeed Performance Report

Merging #16652 will not alter performance

Comparing estasney:fix-configuring-extra-loggers (a465bc2) with main (5b11e56)

Summary

✅ 2 untouched benchmarks

@j-carson
Copy link

j-carson commented Jan 9, 2025

I added a note to the issue, but this was not the change I wanted to do -- I wanted the level to be set on the handler which prefect owns and creates in this function, not on the logger, which belongs to some other library and may have other handlers on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants