#NEWLINE# def format( self , record ) : #NEWLINE# #INDENT# record . levelname = record . levelname . lower ( ) #NEWLINE# if ( record . levelno in self . fmtFromLevel ) : #NEWLINE# #INDENT# _saved_fmt = _saved_fmt . _fmt #NEWLINE# self . _fmt = self . fmtFromLevel [ record . levelno ] #NEWLINE# try : #NEWLINE# #INDENT# return logging . Formatter . format ( self , record ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . _fmt = _saved_fmt #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return logging . Formatter . format ( self , record )