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)