Don't set logging level when used as a library
还没有人认领这个 Issue。
评估
调研方向
Start at Server.serve and Server._setup_logging, then compare how logging is configured in cli.py. Keep library use from changing application and dependency loggers, while preserving the CLI's intended logging behavior; verify the affected server and CLI paths manually or with the repository's existing tests.
由索引模型根据 Issue 内容生成。
描述
Server.serve calls Server._setup_logging which explicitly sets the logging level to INFO and hooks up the tornado logger to the output too.
As a user of a library, I should be able to be in control about what gets printed to the screen of my app and what dependencies of mine log to where.
I can fix this by monkey-patching the code with:
server = Server()
server._setup_logging = lambda: None
server.serve(root=".")
but I think that by default the library should not alter the loggers and they should instead be set in cli.py, allowing the CLI experience to be nice but giving library users the flexibility to set things how they wish.
- 主要语言
- Python
- 星标
- 1.1k
- 派生
- 148
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lepture/python-livereload 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
lepture/python-livereload#159 · 3 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 35/100
lepture/python-livereload#288 ·
-
难度 3/5 1-2 天 新手友好度 38/100
lepture/python-livereload#283 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
lepture/python-livereload#282 ·
-
难度 4/5 3-5 天 新手友好度 25/100
lepture/python-livereload#279 ·
查看 lepture/python-livereload 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
Juniper/ansible-junos-stdlib#904 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
pollen-robotics/reachy_mini#1457 ·
维护者通常 1 天内回复
-
area:runtime good first issue
难度 2/5 1-3 小时 新手友好度 72/100
WATonomous/wato_f1tenth#39 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
FireDynamics/fdsreader#123 ·
-
难度 1/5 1 小时以内 新手友好度 85/100