#NEWLINE# def configure_logging( self ) : #NEWLINE# #INDENT# 'Create logging handlers for any log output.' #NEWLINE# root_logger = logging . getLogger ( '' ) #NEWLINE# root_logger . setLevel ( logging . DEBUG ) #NEWLINE# console = logging . StreamHandler ( self . stderr ) #NEWLINE# console_level = { #NEWLINE# #INDENT# self . WARNING_LEVEL : logging . WARNING , #NEWLINE# self . INFO_LEVEL : logging . INFO , #NEWLINE# self . DEBUG_LEVEL : logging . DEBUG , #NEWLINE# #UNINDENT# } . get ( self . options . verbose_level , logging . DEBUG ) #NEWLINE# if ( console_level == logging . INFO ) : #NEWLINE# #INDENT# console . setLevel ( logging . WARNING ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# console . setLevel ( console_level ) #NEWLINE# #UNINDENT# if ( logging . DEBUG == console_level ) : #NEWLINE# #INDENT# formatter = logging . Formatter ( formatter . DEBUG_MESSAGE_FORMAT ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# formatter = logging . Formatter ( self . CONSOLE_MESSAGE_FORMAT ) #NEWLINE# #UNINDENT# logging . getLogger ( 'iso8601.iso8601' ) . setLevel ( logging . WARNING ) #NEWLINE# logging . getLogger ( 'urllib3.connectionpool' ) . setLevel ( logging . WARNING ) #NEWLINE# console . setFormatter ( formatter ) #NEWLINE# root_logger . addHandler ( console ) #NEWLINE# return