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

Logging class has some global/instance confusion #71

Open
rsyring opened this issue Jun 29, 2017 · 0 comments
Open

Logging class has some global/instance confusion #71

rsyring opened this issue Jun 29, 2017 · 0 comments

Comments

@rsyring
Copy link
Member

rsyring commented Jun 29, 2017

  1. In the Flask world, init_app() is used used for manager objects that are Globally instantiated but work in the context of multiple flask apps. Since the Logging instance doesn't really do that, each Logging instance is dedicated to a single app instance, all it's init could happen in __init__().
  2. But, each Logging instance is operating on the Global root logger by default, with some help from clear_keg_handlers() to make sure we don't create duplicate handlers. In essence, this is creating a last-app-loaded-wins situation, which may not be desirable.
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

No branches or pull requests

1 participant