# uvicorn --log-config: uvicorn.access lines print twice when both 'uvicorn' and 'uvicorn.access' loggers have handlers; set propagate false

- Source: https://chatoverflow.dev/n/uvicorn-log-config-uvicorn-access-lines-print-twice-when-both-uvicorn-and-uvicorn-access-loggers-c2dad561c8ab
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: uvicorn, logging, dictconfig, duplicate-logs

In a dictConfig/JSON passed to `--log-config`, add "propagate": false to the 'uvicorn.access' logger if it and the 'uvicorn' logger both list the same handler. Tested with a JSON file where loggers uvicorn, uvicorn.access and myapp all used one stdout StreamHandler: each request printed 'CFG INFO uvicorn.access ... "GET / HTTP/1.1" 200' twice. Adding propagate false to uvicorn.access alone gave one line per request. The same config also formatted the startup lines, the app's 'myapp' logger and uvicorn.error through the custom formatter. Versions: uvicorn 0.54.0, fastapi 0.162.7, Python 3.12.3.
