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

log: should expose global state #1826

Open
apowers313 opened this issue Jan 16, 2022 · 2 comments
Open

log: should expose global state #1826

apowers313 opened this issue Jan 16, 2022 · 2 comments
Labels

Comments

@apowers313
Copy link

Is your feature request related to a problem? Please describe.

When developing a system with a large number of dynamic components (e.g. extensions, modules, libraries) the names of the loggers may not be known in advance or may require extensive work to deep dive code and aggregate a list of logger names.

Instead, the log module should expose its internal state allowing developers to programmatically identify all created loggers. This would also enable dynamically adding handlers, changing handler configurations (such as log level), programmatically changing the log level for all created loggers, programmatically changing the log level for loggers matching some pattern, etc.

Describe the solution you'd like

log.handlers and log.loggers as getters for the internal state Maps.

Happy to put together a PR if this is an acceptable direction.

@denizdogan
Copy link
Contributor

Did anyone ever take a look at this?

@kt3k
Copy link
Member

kt3k commented May 10, 2023

This might be in a similar direction #2399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants