From fa42aa48108549205900b97173820d836dadd4c5 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 16 Nov 2021 12:04:52 +0000 Subject: [PATCH] log pandora errors too --- pandora/item/models.py | 2 +- pandora/item/tasks.py | 2 +- pandora/settings.py | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index a5f44aca3..6279948da 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -43,7 +43,7 @@ from user.utils import update_groups from user.models import Group import archive.models -logger = logging.getLogger(__name__) +logger = logging.getLogger('pandora.' + __name__) User = get_user_model() diff --git a/pandora/item/tasks.py b/pandora/item/tasks.py index 6a33cf0ad..7bfa24366 100644 --- a/pandora/item/tasks.py +++ b/pandora/item/tasks.py @@ -17,7 +17,7 @@ from app.utils import limit_rate from taskqueue.models import Task -logger = logging.getLogger(__name__) +logger = logging.getLogger('pandora.' + __name__) @periodic_task(run_every=timedelta(days=1), queue='encoding') diff --git a/pandora/settings.py b/pandora/settings.py index af0283315..8f97c89c3 100644 --- a/pandora/settings.py +++ b/pandora/settings.py @@ -161,13 +161,18 @@ LOGGING = { 'errors': { 'level': 'ERROR', 'class': 'log.utils.ErrorHandler' - } + }, }, 'loggers': { - 'django.request': { + 'django': { 'handlers': ['errors'], 'level': 'ERROR', - 'propagate': True, + 'propagate': False, + }, + 'pandora': { + 'handlers': ['errors'], + 'level': 'ERROR', + 'propagate': False, }, } }