Skip to content

logging.StreamHandler should call super().__init__() #691

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
ulda opened this issue Jun 22, 2023 · 1 comment
Open

logging.StreamHandler should call super().__init__() #691

ulda opened this issue Jun 22, 2023 · 1 comment

Comments

@ulda
Copy link

ulda commented Jun 22, 2023

logging.StreamHandler inherits from logging.Handler but does not call super().init()
so it misses to initialize level and formatter instance variables

by the way, logging.Handler should initialize formatter to a working formatter, not None.
e.g. if you create and add a new StreamHandler, it has no formatter set by default and any logging will generate an exception.

@colin-nolan
Copy link

I also encountered this issue, and have added a PR to fix in #710.

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

2 participants