From 26edd2f0401c164c7ab7274b8729c7ba158c3998 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 21 Jun 2023 17:45:09 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jumpserver/settings/logging.py | 2 +- apps/ops/celery/signal_handler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/jumpserver/settings/logging.py b/apps/jumpserver/settings/logging.py index 8dae9e371..6d4498e3f 100644 --- a/apps/jumpserver/settings/logging.py +++ b/apps/jumpserver/settings/logging.py @@ -106,7 +106,7 @@ LOGGING = { 'propagate': False, }, 'jumpserver': { - 'handlers': ['console'], + 'handlers': ['console', 'file'], 'level': LOG_LEVEL, }, 'drf_exception': { diff --git a/apps/ops/celery/signal_handler.py b/apps/ops/celery/signal_handler.py index 17455fe96..bfd68508a 100644 --- a/apps/ops/celery/signal_handler.py +++ b/apps/ops/celery/signal_handler.py @@ -46,6 +46,6 @@ def add_celery_logger_handler(sender=None, logger=None, loglevel=None, format=No return task_handler = CeleryThreadTaskFileHandler() task_handler.setLevel(loglevel) - formatter = logging.Formatter('abc: ' + format) + formatter = logging.Formatter(format) task_handler.setFormatter(formatter) logger.addHandler(task_handler)