initial code repo
[stor4nfv.git] / src / ceph / src / pybind / mgr / restful / hooks.py
diff --git a/src/ceph/src/pybind/mgr/restful/hooks.py b/src/ceph/src/pybind/mgr/restful/hooks.py
new file mode 100644 (file)
index 0000000..3fd244a
--- /dev/null
@@ -0,0 +1,9 @@
+from pecan.hooks import PecanHook
+
+import traceback
+
+import module
+
+class ErrorHook(PecanHook):
+    def on_error(self, stat, exc):
+        module.instance.log.error(str(traceback.format_exc()))