#NEWLINE# def setup_logging( config , verbosity_level , save_debug_log ) : #NEWLINE# #INDENT# logging . captureWarnings ( True ) #NEWLINE# if config [ 'logging' ] [ 'config_file' ] : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# path = config [ 'logging' ] [ 'config_file' ] #NEWLINE# logging . config . fileConfig ( path , disable_existing_loggers = False ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# logger . error ( 'Loading logging config %r failed. %s' , path , e ) #NEWLINE# #UNINDENT# #UNINDENT# setup_console_logging ( config , verbosity_level ) #NEWLINE# if save_debug_log : #NEWLINE# #INDENT# setup_debug_logging_to_file ( config ) #NEWLINE# #UNINDENT# _delayed_handler . release ( )