Skip to content

Commit 798c1e0

Browse files
fix: Prevent duplicate logging messages (#1249)
Fixes #1191 which had a regression: disables the uvicorn access_log logging, which logs all incoming and requests at the INFO level- instead our injected `log_request_details` logs healthz probes at DEBUG and all other endpoints at INFO. Previously we were also logging all endpoints twice, once with our middleware and once with the access probe.
1 parent 6115b04 commit 798c1e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/blueapi/service/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,9 @@ def start(config: ApplicationConfig):
573573
app.state.config = config
574574
assert config.api.url.host is not None, "API URL missing host"
575575
assert config.api.url.port is not None, "API URL missing port"
576-
uvicorn.run(app, host=config.api.url.host, port=config.api.url.port)
576+
uvicorn.run(
577+
app, host=config.api.url.host, port=config.api.url.port, access_log=False
578+
)
577579

578580

579581
async def add_api_version_header(

0 commit comments

Comments
 (0)