feat: add access logging middleware and disable default uvicorn access log

This commit is contained in:
Lorenzo Venerandi
2026-03-09 17:54:35 +01:00
parent fb70e497a3
commit 40f1051d1f
2 changed files with 30 additions and 2 deletions

View File

@@ -112,6 +112,10 @@ class LoggerManager:
credential_file_handler.setFormatter(credential_format)
self._credential_logger.addHandler(credential_file_handler)
# Disable uvicorn's default access log to avoid duplicate entries
# with the wrong (proxy) IP. Our custom access logger handles this.
logging.getLogger("uvicorn.access").setLevel(logging.WARNING)
self._initialized = True
@property