Specify Flask logging level via CLI
还没有人认领这个 Issue。
评估
调研方向
Start in app/main.py at the linked logging setup and reproduce the FLASK_APP=app/main.py flask cli streaming-mode example. Trace how Flask CLI commands initialize logging and use the proposed environment-variable behavior as the scope. Done means CLI runs can select a logging level and suppress the unwanted Flask output without changing normal application logging.
由索引模型根据 Issue 内容生成。
描述
While reviewing https://github.com/tiny-pilot/tinypilot/pull/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:
https://github.com/tiny-pilot/tinypilot/blob/959a5a8f0e0fa138ccc2cd3cc7ba46f497e4d4c6/app/main.py#L30
- 主要语言
- Python
- 星标
- 3.5k
- 派生
- 292
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tiny-pilot/tinypilot 的其他 Issue
-
bug medium
难度 2/5 1-3 小时 新手友好度 62/100
tiny-pilot/tinypilot#1419 ·
-
bug
难度 5/5 一周以上 新手友好度 15/100
tiny-pilot/tinypilot#1961 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
tiny-pilot/tinypilot#1929 · 3 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 35/100
tiny-pilot/tinypilot#1899 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
tiny-pilot/tinypilot#1896 ·
查看 tiny-pilot/tinypilot 的全部 Issue
相似的 Issue
-
Examples say cnx未关闭documentation embedded
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
Alishahryar1/free-claude-code#2111 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
namespace operations
难度 2/5 1-3 小时 新手友好度 72/100
EclipseFdn/open-vsx.org#14373 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复