Log propagation issue
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
Research direction
Start at the server startup entry point that calls uvicorn.run and inspect how its logging configuration is passed. Reproduce serving with uvicorn, then verify that server logs reach the root logger while access-log noise remains appropriately filtered when writing log files.
Written by the indexing model from the issue text.
Description
Describe the bug
Not all logs propagate to the root logger when serving with uvicorn.
In the OpenFlexure server we fix this by doing:
log_config = copy(uvicorn.config.LOGGING_CONFIG)
log_config["loggers"]["uvicorn"]["propagate"] = True
log_config["loggers"]["uvicorn.access"]["propagate"] = True
...
uvicorn.run(
server.app,
host=args.host,
port=args.port,
log_config=log_config,
timeout_graceful_shutdown=2,
)
Note that log_config["loggers"]["uvicorn.access"]["propagate"] = True is a bit noisy, we filter out most of them when writing log files.
- Dominant language
- Python
- Stars
- 9
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from labthings/labthings-fastapi
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
labthings/labthings-fastapi#405 ·
-
drop-python-version
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
labthings/labthings-fastapi#354 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
labthings/labthings-fastapi#404 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 63/100
labthings/labthings-fastapi#403 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
labthings/labthings-fastapi#401 ·
All issues in labthings/labthings-fastapi
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100