summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/controllers/logging.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pybind/mgr/dashboard/controllers/logging.py')
-rw-r--r--src/pybind/mgr/dashboard/controllers/logging.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/controllers/logging.py b/src/pybind/mgr/dashboard/controllers/logging.py
new file mode 100644
index 00000000..9c7d6de7
--- /dev/null
+++ b/src/pybind/mgr/dashboard/controllers/logging.py
@@ -0,0 +1,10 @@
+from . import UiApiController, BaseController, Endpoint
+from .. import logger
+
+
+@UiApiController('/logging', secure=False)
+class Logging(BaseController):
+
+ @Endpoint('POST', path='js-error')
+ def jsError(self, url, message, stack=None):
+ logger.error('frontend error (%s): %s\n %s\n', url, message, stack)