renamed logger

This commit is contained in:
Jonas Winkler 2020-11-02 18:54:27 +01:00
parent 7d282a4e4e
commit b0a519fd6b
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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"
},
},