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

Specify Flask logging level via CLI #1674

Open
jdeanwallace opened this issue Nov 2, 2023 · 0 comments
Open

Specify Flask logging level via CLI #1674

jdeanwallace opened this issue Nov 2, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jdeanwallace
Copy link
Contributor

jdeanwallace commented Nov 2, 2023

While reviewing #1666, @jotaen4tinypilot suggested we suppress some of the Flask logging when running Flask in CLI commands. Example of logs to suppress:

$ FLASK_APP=app/main.py flask cli streaming-mode
2023-10-30 20:08:12.626 app.main        INFO Starting app
2023-10-30 20:08:12.658 db.store        INFO Loading database migrations from /opt/tinypilot/app/db/migrations/*.sql
2023-10-30 20:08:12.660 db.store        INFO Read 7 database migrations from disk
H264

It seems like we'll need to allow app/main.py to dynamically set the log level based on an environment variable:

root_logger.setLevel(logging.INFO)

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

No branches or pull requests

1 participant