From 7d9690b974263ba499d026eabee504b5bd6cb8ac Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 19 May 2022 09:53:12 +1000 Subject: [PATCH] Add logging message when plugin fails to render custom panels --- InvenTree/plugin/views.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/InvenTree/plugin/views.py b/InvenTree/plugin/views.py index 8d28872695..9b12ef12fe 100644 --- a/InvenTree/plugin/views.py +++ b/InvenTree/plugin/views.py @@ -1,3 +1,4 @@ +import logging import sys import traceback @@ -9,6 +10,9 @@ from error_report.models import Error from plugin.registry import registry +logger = logging.getLogger('inventree') + + class InvenTreePluginViewMixin: """ Custom view mixin which adds context data to the view, @@ -42,6 +46,8 @@ class InvenTreePluginViewMixin: html=ExceptionReporter(self.request, kind, info, data).get_traceback_html(), ) + logger.error(f"Plugin '{plug.slug}' could not render custom panels at '{self.request.path}'") + return panels def get_context_data(self, **kwargs):