1
0
Fork 0

Ignore VariableDoesNotExist errors in debug logging

They're so noisy as to make debug logging useless otherwise
This commit is contained in:
Joel Bradshaw 2022-05-05 13:29:07 -07:00
parent 7905be7de2
commit 7ae0db7f4a
2 changed files with 16 additions and 0 deletions

View file

@ -147,6 +147,9 @@ LOGGING = {
"require_debug_true": {
"()": "django.utils.log.RequireDebugTrue",
},
"ignore_missing_variable": {
"()": "bookwyrm.utils.log.IgnoreVariableDoesNotExist",
},
},
"handlers": {
# Overrides the default handler to make it log to console
@ -154,6 +157,7 @@ LOGGING = {
# console if DEBUG=False)
"console": {
"level": LOG_LEVEL,
"filters": ["ignore_missing_variable"],
"class": "logging.StreamHandler",
},
# This is copied as-is from the default logger, and is