Logs to Info if the debug level is greater than or equal to 1.
10193
static void i(String message){
        if (getStaticDebugLevel() >= CleverTapAPI.LogLevel.INFO.intValue()){
            Log.i(Constants.CLEVERTAP_LOG_TAG,message);
        }
    }
740565
def _check_loglevel(level='info'):
    '''
    
    '''
    try:
        level = level.lower()
        if level == 'quiet':
            return None
        else:
            return LOG_LEVELS[level]
    except (AttributeError, KeyError):
        log.error(
            'Invalid output_loglevel \'%s\'. Valid levels are: %s. Falling '
            'back to \'info\'.',
            level, ', '.join(sorted(LOG_LEVELS, reverse=True))
        )
        return LOG_LEVELS['info']
779279
def worth(what, level_name):
    """"""
    return (logging.NOTSET
            < globals()[what].level
            <= getattr(logging, level_name))
1307353
def level=(severity)
      if severity.is_a?(Integer)
        @logger.level = severity
      else
        case severity.to_s.downcase
        when 'debug'
          @logger.level = DEBUG
        when 'info'
          @logger.level = INFO
        when 'warn'
          @logger.level = WARN
        when 'error'
          @logger.level = ERROR
        when 'fatal'
          @logger.level = FATAL
        when 'unknown'
          @logger.level = UNKNOWN
        else
          raise ArgumentError, "invalid log level: #{severity}"
        end
      end
    end
970273
def set_log_level(logger, level):  # type: (logging.Logger, int) -> None
    """"""
    if level > 2:
        level = 2
    if level < -1:
        level = -1

    levels = {
        -1: logging.ERROR,
        0: logging.WARN,
        1: logging.INFO,
        2: logging.DEBUG
    }
    logger.setLevel(levels[level])
173433
def set_debug(self, status):
        """"""
        if status:
            self.logger.setLevel('DEBUG')
        else:
            self.logger.setLevel('INFO')
1168983
def c_log(level, message):
    """"""
    c_level = level
    level = LEVELS_F2PY[c_level]
    logger.log(level, message)
1145414
function isValidLogLevel(logLevel) {
  const level = cleanLogLevel(logLevel);
  switch (level) {
    case LogLevel.ERROR:
    case LogLevel.WARN:
    case LogLevel.INFO:
    case LogLevel.DEBUG:
    case LogLevel.TRACE:
      return true;
    default:
      return false;
  }
}
1328915
def set_log_level(verbose, quiet):
    '''
    
    '''
    if quiet:
        verbose = -1
    if verbose < 0:
        verbose = logging.CRITICAL
    elif verbose == 0:
        verbose = logging.WARNING
    elif verbose == 1:
        verbose = logging.INFO
    elif 1 < verbose:
        verbose = logging.DEBUG
    LOGGER.setLevel(verbose)
41413
protected void debug(String string, int level) {
		if (VerbosityOption.getValue()>=level){
			System.out.println(string); 
		}
	}
768384
def _set_debug_level(self, debug_level):
    
    mapping = {
        0: logging.ERROR,
        1: logging.INFO,
        2: logging.DEBUG,
    }

    self.setLevel(
        mapping[min(debug_level, 2)],
    )
884736
def showLogging(debug=False):
    

    try:
        log_level = logging.WARN
        log_format = LOG_FORMAT_DEBUG
        if debug:
            log_level = logging.DEBUG
        logging.basicConfig(
            level=log_level,
            format=log_format)
    except:
        logging.basicConfig()
4888
def log(*args, **kwargs):
    """"""
    level = kwargs.pop('level', logging.INFO)
    logger.log(level, *args, **kwargs)
627300
def debug(dbg=True):
    """"""
    global _debug_handler
    if dbg and _debug_handler is None:
        _debug_handler = logging.StreamHandler()
        logger.addHandler(_debug_handler)
        logger.setLevel(logging.DEBUG)
    elif not dbg and _debug_handler is not None:
        logger.removeHandler(_debug_handler)
        _debug_handler = None
        logger.setLevel(logging.WARNING)
386659
def _set_log_level(self):
        
        # set log level on logger
        log_level = "INFO"
        if hasattr(self._config, "level") and self._config.level.upper() in ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]:
            log_level = self._config.level.upper()
        self._log_level = log_level
778633
def log_level(self,
              level: typing.Union[str, int]=None,
              *args,
              **kwargs) -> typing.Union[None, str]:
    
    if level is None:
        return self.root_logger.getEffectiveLevel()
    # NOTE: `setLevel` takes both string and integers. Try to cast to an integer first
    try:
        value = int(level)
    # if we can't cast to an int, it's probably a string
    except ValueError:
        pass

    self.root_logger.setLevel(value)
609637
@VisibleForTesting
  static Level getLogLevel(Throwable t) {
    if (t instanceof IOException
        && t.getMessage() != null
        && QUIET_ERRORS.contains(t.getMessage())) {
      return Level.FINE;
    }
    return Level.INFO;
  }