#NEWLINE# def makeRecord( self , name , level , fn , lno , msg , args , exc_info , func = None , extra = None , sinfo = None ) : #NEWLINE# #INDENT# exc_info_on_loglevel = extra . pop ( 'exc_info_on_loglevel' ) #NEWLINE# if ( not extra ) : #NEWLINE# #INDENT# extra = None #NEWLINE# #UNINDENT# if ( isinstance ( msg , six . string_types ) and ( not isinstance ( msg , six . text_type ) ) ) : #NEWLINE# #INDENT# salt_system_encoding = __salt_system_encoding__ #NEWLINE# if ( salt_system_encoding == 'ascii' ) : #NEWLINE# #INDENT# salt_system_encoding = 'utf-8' #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# _msg = msg . decode ( salt_system_encoding , 'replace' ) #NEWLINE# #UNINDENT# except UnicodeDecodeError : #NEWLINE# #INDENT# _msg = msg . decode ( salt_system_encoding , 'ignore' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# _msg = msg #NEWLINE# #UNINDENT# if six . PY3 : #NEWLINE# #INDENT# logrecord = _LOG_RECORD_FACTORY ( name , level , fn , lno , _msg , args , exc_info , func , sinfo ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# logrecord = _LOG_RECORD_FACTORY ( name , level , fn , lno , _msg , args , exc_info , func ) #NEWLINE# #UNINDENT# if ( extra is not None ) : #NEWLINE# #INDENT# for key in extra : #NEWLINE# #INDENT# if ( ( key in [ 'message' , 'asctime' ] ) or ( key in logrecord . __dict__ ) ) : #NEWLINE# #INDENT# raise KeyError ( "Attempt to overwrite '{0}' in LogRecord" . format ( key ) ) #NEWLINE# #UNINDENT# logrecord . __dict__ [ key ] = extra [ key ] #NEWLINE# #UNINDENT# #UNINDENT# if ( exc_info_on_loglevel is not None ) : #NEWLINE# #INDENT# logrecord . exc_info_on_loglevel_instance = sys . exc_info ( ) #NEWLINE# logrecord . exc_info_on_loglevel_formatted = None #NEWLINE# #UNINDENT# logrecord . exc_info_on_loglevel = exc_info_on_loglevel #NEWLINE# return logrecord