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

Enable stdout logging in run_app by default #3243

Closed
asvetlov opened this issue Sep 6, 2018 · 4 comments · Fixed by #3324
Closed

Enable stdout logging in run_app by default #3243

asvetlov opened this issue Sep 6, 2018 · 4 comments · Fixed by #3324
Labels
good first issue Good for newcomers Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ outdated

Comments

@asvetlov
Copy link
Member

asvetlov commented Sep 6, 2018

Flask adds StreamHandler to application logger if the logger has no handlers at the moment of application startup.
We should do the same in web.run_app. AppRunner should be configured explicitly.

http://flask.pocoo.org/docs/1.0/logging/#default-configuration

See #2952 (comment) for motivation

@asvetlov asvetlov added the good first issue Good for newcomers label Oct 2, 2018
@asvetlov
Copy link
Member Author

asvetlov commented Oct 2, 2018

The fix is relatively easy.

@webknjaz webknjaz added Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ and removed Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ labels Oct 3, 2018
@0az
Copy link
Contributor

0az commented Oct 4, 2018

Mind if I have a go at this?

If I understand this issue correctly, all that needs to be done is add a check at the start of run_app in web.py before the AppRunner is created. Is this correct?

@asvetlov
Copy link
Member Author

asvetlov commented Oct 5, 2018

Please do.
Your understanding is correct.

@lock
Copy link

lock bot commented Nov 24, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Nov 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ outdated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants