~devcamcar/horizon/trunk

« back to all changes in this revision

Viewing changes to openstack-dashboard/dashboard/middleware.py

  • Committer: Devin Carlen
  • Date: 2011-06-18 05:59:37 UTC
  • Revision ID: devin.carlen@gmail.com-20110618055937-aobwm0buvviijz3o
Moved codebase to GitHub

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import logging
2
 
import traceback
3
 
 
4
 
LOG = logging.getLogger('openstack_dashboard')
5
 
 
6
 
 
7
 
class DashboardLogUnhandledExceptionsMiddleware(object):
8
 
    def process_exception(self, request, exception):
9
 
        tb_text = traceback.format_exc()
10
 
        LOG.critical('Unhandled Exception in dashboard. Exception "%s"'
11
 
                     '\n%s' % (str(exception), tb_text))