summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/restful/hooks.py
blob: d677dcc2a15a7c55774165a11e010dabe40d78e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
from __future__ import absolute_import

from pecan.hooks import PecanHook

import traceback

from . import context

class ErrorHook(PecanHook):
    def on_error(self, stat, exc):
        context.instance.log.error(str(traceback.format_exc()))