diff --git a/src/documents/loggers.py b/src/documents/loggers.py index 4657c9b6c..d9c90ab16 100644 --- a/src/documents/loggers.py +++ b/src/documents/loggers.py @@ -1,7 +1,7 @@ import logging -class PaperlessLogger(logging.StreamHandler): +class PaperlessHandler(logging.Handler): def emit(self, record): # We have to do the import here or Django will barf when it tries to # load this because the apps aren't loaded at that point diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 45a4cf31b..9cf102266 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -239,13 +239,16 @@ LOGGING = { "version": 1, "disable_existing_loggers": False, "handlers": { - "dblogger": { - "class": "documents.loggers.PaperlessLogger", + "dbhandler": { + "class": "documents.loggers.PaperlessHandler", + }, + "streamhandler": { + "class": "logging.StreamHandler" } }, "loggers": { "documents": { - "handlers": ["dblogger"], + "handlers": ["dbhandler", "streamhandler"], "level": "DEBUG" }, },