This commit is contained in:
2026-05-27 10:49:06 +03:00
parent c9d720f29a
commit 614bf9123a
3 changed files with 7 additions and 1 deletions

View File

@@ -205,6 +205,12 @@ def configure_logger(config):
cot_handler = logging.StreamHandler()
cot_handler.setFormatter(CotJsonFormatter())
cot_logger.addHandler(cot_handler)
# Disable propagation to prevent duplicate output via uvicorn's root logger handlers.
# Both loggers have their own dedicated handlers; propagation would cause each message
# to appear twice: once via CotJsonFormatter (JSON) and once via uvicorn's DefaultFormatter (text).
logger.propagate = False
cot_logger.propagate = False
# #endregion configure_logger