]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Configures logging to capture celery and kombu debugging to library
authorTrenton Holmes <797416+stumpylog@users.noreply.github.com>
Sat, 25 Mar 2023 18:40:12 +0000 (11:40 -0700)
committerTrenton H <797416+stumpylog@users.noreply.github.com>
Sun, 26 Mar 2023 02:17:02 +0000 (19:17 -0700)
src/paperless/settings.py

index e7f53d8ce1e7f3a3429271a50d8b4579387bdd02..d052b4cac551fdb16f8c40ed61183c395b953ed1 100644 (file)
@@ -611,11 +611,20 @@ LOGGING = {
             "maxBytes": LOGROTATE_MAX_SIZE,
             "backupCount": LOGROTATE_MAX_BACKUPS,
         },
+        "file_celery": {
+            "class": "concurrent_log_handler.ConcurrentRotatingFileHandler",
+            "formatter": "verbose",
+            "filename": os.path.join(LOGGING_DIR, "celery.log"),
+            "maxBytes": LOGROTATE_MAX_SIZE,
+            "backupCount": LOGROTATE_MAX_BACKUPS,
+        },
     },
     "root": {"handlers": ["console"]},
     "loggers": {
         "paperless": {"handlers": ["file_paperless"], "level": "DEBUG"},
         "paperless_mail": {"handlers": ["file_mail"], "level": "DEBUG"},
+        "celery": {"handlers": ["file_celery"], "level": "DEBUG"},
+        "kombu": {"handlers": ["file_celery"], "level": "DEBUG"},
     },
 }