Files
tuskar-ui/openstack-dashboard/dashboard/middleware.py
2011-06-03 13:07:41 -07:00

12 lines
362 B
Python

import logging
import traceback
LOG = logging.getLogger('openstack_dashboard')
class DashboardLogUnhandledExceptionsMiddleware(object):
def process_exception(self, request, exception):
tb_text = traceback.format_exc()
LOG.critical('Unhandled Exception in dashboard. Exception "%s"'
'\n%s' % (str(exception), tb_text))