#NEWLINE# def log( self , code , response_content , exception = False ) : #NEWLINE# #INDENT# if self . process_log : #NEWLINE# #INDENT# self . process_log = ( '\nProcess Flow: -------------------------------------------\n%s\n---------------------------------------------------------' % self . process_log ) #NEWLINE# #UNINDENT# debug_info = ( '%s\nReturn Data: --------------------------------------------\n%s\n---------------------------------------------------------' % ( self . process_log , str ( response_content ) ) ) #NEWLINE# if ( code == 'success' ) : #NEWLINE# #INDENT# if ( log . parent . level == logging . DEBUG ) : #NEWLINE# #INDENT# log . info ( '%s %s %s %s' , request . path , self . codes [ code ] , self . params_log , debug_info ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# log . info ( '%s %s %s' , request . path , self . codes [ code ] , self . params_log ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if exception : #NEWLINE# #INDENT# log . exception ( '%s %s %s %s' , request . path , self . codes [ code ] , self . params_log , debug_info ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# log . error ( '%s %s %s %s' , request . path , self . codes [ code ] , self . params_log , debug_info )