reorganized logging.

This commit is contained in:
jonaswinkler 2020-12-03 01:03:56 +01:00
parent 748b27c680
commit d661f87f63

View File

@ -256,26 +256,43 @@ DISABLE_DBHANDLER = __get_boolean("PAPERLESS_DISABLE_DBHANDLER")
LOGGING = { LOGGING = {
"version": 1, "version": 1,
"disable_existing_loggers": False, "disable_existing_loggers": False,
'formatters': {
'verbose': {
'format': '{levelname} {asctime} {module} {message}',
'style': '{',
},
'simple': {
'format': '{levelname} {message}',
'style': '{',
},
},
"handlers": { "handlers": {
"dbhandler": { "db": {
"level": "DEBUG",
"class": "documents.loggers.PaperlessHandler", "class": "documents.loggers.PaperlessHandler",
}, },
"streamhandler": { "console": {
"class": "logging.StreamHandler" "level": "WARNING",
"class": "logging.StreamHandler",
"formatter": "verbose",
} }
}, },
"root": {
"handlers": ["console"],
"level": "DEBUG",
},
"loggers": { "loggers": {
"documents": { "documents": {
"handlers": ["dbhandler", "streamhandler"], "handlers": ["db"],
"level": "DEBUG" "propagate": True,
}, },
"paperless_mail": { "paperless_mail": {
"handlers": ["dbhandler", "streamhandler"], "handlers": ["db"],
"level": "DEBUG" "propagate": True,
}, },
"paperless_tesseract": { "paperless_tesseract": {
"handlers": ["dbhandler", "streamhandler"], "handlers": ["db"],
"level": "DEBUG" "propagate": True,
}, },
}, },
} }