Log iteration number and mismatch

        Parameters
        ----------
        level
            logging level
        Returns
        -------
        None
351887
def _iter_info(self, niter, level=logging.INFO):
        
        max_mis = self.iter_mis[niter - 1]
        msg = ' Iter {:<d}.  max mismatch = {:8.7f}'.format(niter, max_mis)
        logger.info(msg)
1092654
def set_multiprocessing_logging_level_by_opts(opts):
    '''
    
    '''
    global __MP_LOGGING_LEVEL

    log_levels = [
        LOG_LEVELS.get(opts.get('log_level', '').lower(), logging.ERROR),
        LOG_LEVELS.get(opts.get('log_level_logfile', '').lower(), logging.ERROR)
    ]
    for level in six.itervalues(opts.get('log_granular_levels', {})):
        log_levels.append(
            LOG_LEVELS.get(level.lower(), logging.ERROR)
        )

    __MP_LOGGING_LEVEL = min(log_levels)
1015760
def level(self):
        
        m = re.match(
            self.compliance_prefix +
            r'(\d)' +
            self.compliance_suffix +
            r'$',
            self.compliance)
        if (m):
            return int(m.group(1))
        raise IIIFInfoError(
            "Bad compliance profile URI, failed to extract level number")
1355796
def get_loglevel(level):
    
    if level == 'debug':
        return logging.DEBUG
    elif level == 'notice':
        return logging.INFO
    elif level == 'info':
        return logging.INFO
    elif level == 'warning' or level == 'warn':
        return logging.WARNING
    elif level == 'error' or level == 'err':
        return logging.ERROR
    elif level == 'critical' or level == 'crit':
        return logging.CRITICAL
    elif level == 'alert':
        return logging.CRITICAL
    elif level == 'emergency' or level == 'emerg':
        return logging.CRITICAL
    else:
        return logging.INFO
742091
def set_log_level(self, level):
        
        self._log_level = level
        if self._python_logger:
            try:
                level = self.PYTHON_LEVEL.get(level)
            except ValueError as err:
                raise FailReply("Unknown logging level '%s'" % (level))
            self._python_logger.setLevel(level)
387499
def set_level_for_logger_and_its_handlers(log: logging.Logger,
                                          level: int) -> None:
    
    log.setLevel(level)
    for h in log.handlers:  # type: logging.Handler
        h.setLevel(level)
345318
def _get_py_loglevel(lvl):
    
    if not lvl:
        lvl = 'INFO'

    return LOG_LEVEL_MAP.get(lvl.upper(), logging.DEBUG)
115204
def set_loglevel(level: Union[int, str, None] = None) -> None:
    
    if level is not None:
        lv = level_to_int(level)
    elif config.logging:
        lv = level_to_int(config.logging)
    elif config.debug:
        lv = logging.DEBUG
    else:
        lv = logging.INFO
    root_logger.setLevel(lv)
    _log_handler.setLevel(lv)
1035442
private static void writeToLog(Logger logger, Level level, String pattern, Exception exception) {
    if (level == Level.ERROR) {
      logger.error(pattern, exception);
    } else if (level == Level.INFO) {
      logger.info(pattern);
    } else if (level == Level.DEBUG) {
      logger.debug(pattern);
    }
  }
227772
private Level getLogLevel() {
        return isQuiet() ? Level.OFF : isVerbose() ? Level.DEBUG : Level.INFO;
    }
776123
def logging_level_verbosity(logging_verbosity):
  
  name_to_level = {
    'FATAL': tf.logging.FATAL,
    'ERROR': tf.logging.ERROR,
    'WARN': tf.logging.WARN,
    'INFO': tf.logging.INFO,
    'DEBUG': tf.logging.DEBUG
  }

  try:
    return name_to_level[logging_verbosity]
  except Exception as e:
    raise RuntimeError('Not supported logs verbosity (%s). Use one of %s.' %
                       (str(e), list(name_to_level)))
544569
def verify_log(opts):
    '''
    
    '''
    level = LOG_LEVELS.get(str(opts.get('log_level')).lower(), logging.NOTSET)

    if level < logging.INFO:
        log.warning('Insecure logging configuration detected! Sensitive data may be logged.')
280019
private Level mapLogLevel(final LogLevel logLevel) {
		if (LogLevel.DEBUG.equals(logLevel)) {
			return Level.DEBUG;
		} else if (LogLevel.TRACE.equals(logLevel)) {
			return Level.TRACE;
		} else if (LogLevel.INFO.equals(logLevel)) {
			return Level.INFO;
		} else if (LogLevel.WARN.equals(logLevel)) {
			return Level.WARN;
		} else if (LogLevel.ERROR.equals(logLevel)) {
			return Level.ERROR;
		}
		return null;
	}
1301435
private void recursiveLogResult(StringBuilder buf, Hierarchy<Result> hier, Result result, int depth) {
    if(result == null) {
      buf.append("null");
      LOG.warning("null result!");
      return;
    }
    if(depth > 50) {
      LOG.warning("Probably infinitely nested results, aborting!");
      return;
    }
    for(int i = 0; i < depth; i++) {
      buf.append(' ');
    }
    buf.append(result.getClass().getSimpleName()).append(": ").append(result.getLongName()) //
        .append(" (").append(result.getShortName()).append(")\n");
    if(hier.numChildren(result) > 0) {
      for(It<Result> iter = hier.iterChildren(result); iter.valid(); iter.advance()) {
        recursiveLogResult(buf, hier, iter.get(), depth + 1);
      }
    }
  }
856948
public static void setLogLevel(String cls, String level){
        Logger l = null;
        if(Objects.isNullOrEmpty(cls))
            l = LogManager.getRootLogger();
        else
            l = LogManager.getLogger(cls);
        if(level.equalsIgnoreCase("TRACE"))
            l.setLevel(Level.TRACE);
        else if(level.equalsIgnoreCase("DEBUG"))
            l.setLevel(Level.DEBUG);
        else if(level.equalsIgnoreCase("INFO"))
            l.setLevel(Level.INFO);
        else if(level.equalsIgnoreCase("WARN"))
            l.setLevel(Level.WARN);
        else if(level.equalsIgnoreCase("ERROR"))
            l.setLevel(Level.ERROR);
    }
18815
def setLoggerLevel(self, logger, level):
        
        if logger == 'root':
            _log = logging.getLogger()
        else:
            _log = logging.getLogger(logger)
        
        _log.setLevel(level)
        
        if level == logging.NOTSET:
            self._loggerLevels.pop(logger, None)
        else:
            self._loggerLevels[logger] = level
770074
function getLogLevel(level, action, payload, type) {
  switch (typeof level) {
  case 'object':
    return typeof level[type] === 'function' ? level[type](...payload) : level[type]
  case 'function':
    return level(action)
  default:
    return level
  }
}