#NEWLINE# def formatException( self , exc_info , record = None ) : #NEWLINE# #INDENT# 'Format exception output with CONF.logging_exception_prefix.' #NEWLINE# if ( not record ) : #NEWLINE# #INDENT# return logging . Formatter . formatException ( self , exc_info ) #NEWLINE# #UNINDENT# stringbuffer = moves . StringIO ( ) #NEWLINE# traceback . print_exception ( exc_info [ 0 ] , exc_info [ 1 ] , exc_info [ 2 ] , None , stringbuffer ) #NEWLINE# lines = stringbuffer . getvalue ( ) . split ( '\n' ) #NEWLINE# stringbuffer . close ( ) #NEWLINE# if ( CONF . logging_exception_prefix . find ( '%(asctime)' ) != ( - 1 ) ) : #NEWLINE# #INDENT# record . asctime = self . formatTime ( record , self . datefmt ) #NEWLINE# #UNINDENT# formatted_lines = [ ] #NEWLINE# for line in lines : #NEWLINE# #INDENT# pl = ( CONF . logging_exception_prefix % record . __dict__ ) #NEWLINE# fl = ( '%s%s' % ( pl , line ) ) #NEWLINE# formatted_lines . append ( fl ) #NEWLINE# #UNINDENT# return '\n' . join ( formatted_lines )