def __remove_temp_logging_handler():
 if is_logging_configured():
  return
 __remove_null_logging_handler()
 root_logger = logging.getLogger()
 global LOGGING_TEMP_HANDLER
 for handler in root_logger.handlers:
  if (handler is LOGGING_TEMP_HANDLER):
   root_logger.removeHandler(LOGGING_TEMP_HANDLER)
   LOGGING_TEMP_HANDLER = None
   break
 if (sys.version_info >= (2, 7)):
  logging.captureWarnings(True)

def __remove_temp_logging_handler ( ) : if is_logging_configured ( ) : return __remove_null_logging_handler ( ) root_logger = logging . getLogger ( ) global LOGGING_TEMP_HANDLER for handler in root_logger . handlers : if ( handler is LOGGING_TEMP_HANDLER ) : root_logger . removeHandler ( LOGGING_TEMP_HANDLER ) LOGGING_TEMP_HANDLER = None break if ( sys . version_info >= ( 2 , 7 ) ) : logging . captureWarnings ( True )
this function will run once logging has been configured .