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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
Fix: Set Celery LOG_File only when available, always log to console (#10563)
fdb02983rhy16db2c4e573e
diff --git a/api/extensions/ext_celery.py b/api/extensions/ext_celery.pyindex c5de7395b8c..42012eee8e6 100644--- a/api/extensions/ext_celery.py+++ b/api/extensions/ext_celery.py@@ -46,7 +46,6 @@ def init_app(app: Flask) -> Celery:broker_connection_retry_on_startup=True,worker_log_format=dify_config.LOG_FORMAT,worker_task_log_format=dify_config.LOG_FORMAT,- worker_logfile=dify_config.LOG_FILE,worker_hijack_root_logger=False,timezone=pytz.timezone(dify_config.LOG_TZ),)@@ -56,6 +55,11 @@ def init_app(app: Flask) -> Celery:broker_use_ssl=ssl_options, # Add the SSL options to the broker configuration)+ if dify_config.LOG_FILE:+ celery_app.conf.update(+ worker_logfile=dify_config.LOG_FILE,+ )+celery_app.set_default()app.extensions["celery"] = celery_appdiff --git a/api/extensions/ext_logging.py b/api/extensions/ext_logging.pyindex 56b1d6bd28b..a15c73bd717 100644--- a/api/extensions/ext_logging.py+++ b/api/extensions/ext_logging.py@@ -9,19 +9,21 @@ from configs import dify_configdef init_app(app: Flask):- log_handlers = None+ log_handlers = []log_file = dify_config.LOG_FILEif log_file:log_dir = os.path.dirname(log_file)os.makedirs(log_dir, exist_ok=True)- log_handlers = [+ log_handlers.append(RotatingFileHandler(filename=log_file,maxBytes=dify_config.LOG_FILE_MAX_SIZE * 1024 * 1024,backupCount=dify_config.LOG_FILE_BACKUP_COUNT,- ),- logging.StreamHandler(sys.stdout),- ]+ )+ )++ # Always add StreamHandler to log to console+ log_handlers.append(logging.StreamHandler(sys.stdout))logging.basicConfig(level=dify_config.LOG_LEVEL,