code: def setLogLevel(level, logger=None):
      
      if logger is None:
          logger = rootLogger
      level = level.upper()
      if level == "OFF": level = "CRITICAL"
      # Note that getLevelName works in both directions, numeric to textual and textual to numeric
      numericLevel = logging.getLevelName(level)
      assert logging.getLevelName(numericLevel) == level
      logger.setLevel(numericLevel)
      # There are quite a few cases where we expect AWS requests to fail, but it seems
      # that boto handles these by logging the error *and* raising an exception. We
      # don't want to confuse the user with those error messages.
      logging.getLogger( 'boto' ).setLevel( logging.CRITICAL )
docs: Sets the log level to a given string level (like "INFO"). Operates on the
      root logger by default, but another logger can be specified instead.