def setup_logger(debug, color):
 if debug:
  log_level = logging.DEBUG
 else:
  log_level = logging.INFO
 logger = logging.getLogger('exifread')
 stream = Handler(log_level, debug, color)
 logger.addHandler(stream)
 logger.setLevel(log_level)

def setup_logger ( debug , color ) : if debug : log_level = logging . DEBUG else : log_level = logging . INFO logger = logging . getLogger ( 'exifread' ) stream = Handler ( log_level , debug , color ) logger . addHandler ( stream ) logger . setLevel ( log_level )
configure the logger .