code: def _config_logs(lvl=None, name=None):
      
      # print('_config_log', 'from %s' %name if name else '')
      FORMAT = '%(message)s'
      # maybe better for log files
      # FORMAT='[%(levelname)s]:%(message)s',
  
      # Reset handlers
      for h in list(logging.root.handlers):
          logging.root.removeHandler(h)
  
      global _log_level
      if lvl: _log_level = lvl
  
      logging.basicConfig(level=_log_level, format=FORMAT, stream=sys.stdout)
      _log = logging.getLogger(__name__)
      _log.setLevel(_log_level)
  
      # external
      for log in ['urllib3', 'asyncio']:
          logging.getLogger(log).setLevel(_log_level)
docs: Set up or change logging configuration.
  
      _config_logs() => idempotent setup;
      _config_logs(L) => change log level