Browse Source

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

Signed-off-by: -LAN- <laipz8200@outlook.com>
tags/1.3.0
-LAN- 6 months ago
parent
commit
be6a88cb77
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      api/extensions/ext_logging.py

+ 2
- 0
api/extensions/ext_logging.py View File

@@ -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

Loading…
Cancel
Save