Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: Prevents duplicate logs from SQLAlchemy engine (#18024)

-LAN-be6a88cb7794
diff --git a/api/extensions/ext_logging.py b/api/extensions/ext_logging.py
index bf9b492a506..422ec877656 100644
--- a/api/extensions/ext_logging.py
+++ b/api/extensions/ext_logging.py
@@ -36,6 +36,8 @@ def init_app(app: DifyApp):
handlers=log_handlers,
force=True,
)
+ # Disable propagation for noisy loggers to avoid duplicate logs
+ logging.getLogger("sqlalchemy.engine").propagate = False
log_tz = dify_config.LOG_TZ
if log_tz:
from datetime import datetime