#NEWLINE# def _SetupLogging( verbose ) : #NEWLINE# #INDENT# 'Setupup logging infrastructure.\n\n  ' #NEWLINE# fmt = logging . Formatter ( '%(asctime)s: %(threadName)s %(levelname)s %(message)s' ) #NEWLINE# if verbose : #NEWLINE# #INDENT# handler = logging . StreamHandler ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# handler = logging . FileHandler ( os . devnull , 'a' ) #NEWLINE# #UNINDENT# handler . setLevel ( logging . NOTSET ) #NEWLINE# handler . setFormatter ( fmt ) #NEWLINE# root_logger = logging . getLogger ( '' ) #NEWLINE# root_logger . setLevel ( logging . NOTSET ) #NEWLINE# root_logger . addHandler ( handler )