summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/controllers/logging.py
blob: 9c7d6de7ee2ea514ee816e8080455a4d4104ef36 (plain)
1
2
3
4
5
6
7
8
9
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)