From 0d40ca1fb5bceba13d7b64dbc572a993a62606b0 Mon Sep 17 00:00:00 2001 From: xiaji Date: Wed, 14 Jan 2026 22:36:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(settings):=20=E6=B7=BB=E5=8A=A0=20Celery?= =?UTF-8?q?=20=E6=97=A5=E5=BF=97=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 settings.py 中追加 Celery 的日志文件路径和日志级别配置,便于后续日志管理和问题排查 --- diary_family/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diary_family/settings.py b/diary_family/settings.py index 23cb600..6b5c3a1 100644 --- a/diary_family/settings.py +++ b/diary_family/settings.py @@ -176,4 +176,8 @@ EMAIL_PORT = 25 # 或根据你的 SMTP 服务器设置 # Reports files configuration REPORTS_URL = '/reports/' -REPORTS_ROOT = BASE_DIR / 'reports' # 可以修改为其他路径 \ No newline at end of file +REPORTS_ROOT = BASE_DIR / 'reports' # 可以修改为其他路径 + +# Django settings.py 中追加 Celery 日志配置 +CELERY_LOG_FILE = "/var/log/celery/worker.log" # 你的指定日志路径 +CELERY_LOG_LEVEL = "INFO" # 日志级别 \ No newline at end of file