Given to TANGO logging level, converts it to lo4j level
975087
public Level tango_to_log4j_level (int level) throws DevFailed
  {
    switch (level) {
      case LOGGING_OFF:
        return Level.OFF;
      case LOGGING_FATAL:
        return Level.FATAL;
      case LOGGING_ERROR:
        return Level.ERROR;
     case LOGGING_WARN:
        return Level.WARN;
      case LOGGING_INFO:
        return Level.INFO;
      case LOGGING_DEBUG:
        return Level.DEBUG;
      default:
        String desc = "Invalid logging level specified (out of range)";
        Except.throw_exception("API_MethodArgument", desc, "Logging::tango_to_log4j_level");
    }
    //- Make compiler happy
    return Level.WARN;
  }
868840
private static Level translateLevel(final org.tinylog.Level level) {
		switch (level) {
			case TRACE:
				return Level.TRACE;
			case DEBUG:
				return Level.DEBUG;
			case INFO:
				return Level.INFO;
			case WARN:
				return Level.WARN;
			case ERROR:
				return Level.ERROR;
			case OFF:
				return Level.OFF;
			default:
				throw new IllegalArgumentException("Unknown tinylog 2 severity level \"" + level + "\"");
		}
	}
419676
function getLogLevel(level, action, payload, type) {
  switch (typeof level === 'undefined' ? 'undefined' : _typeof(level)) {
    case 'object':
      return typeof level[type] === 'function' ? level[type].apply(level, _toConsumableArray(payload)) : level[type];
    case 'function':
      return level(action);
    default:
      return level;
  }
}
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);
    }
414178
public void set_logging_level (DevVarLongStringArray dvlsa) throws DevFailed {
    //- Check input
    if (dvlsa.svalue.length != dvlsa.svalue.length) {
      String desc = "Imcompatible command argument type, long and string arrays must have the same length";
      Except.throw_exception("API_IncompatibleCmdArgumentType", desc, "Logging::set_logging_level");
    }
    //- For each entry in dvlsa.svalue
    for (int i = 0; i < dvlsa.svalue.length; i++) {
      //- Check/get logging level (may throw DevFailed)
      Level level = tango_to_log4j_level(dvlsa.lvalue[i]);
      //- Get ith wilcard
      String pattern = dvlsa.svalue[i].toLowerCase();
      //- Get devices which name matches the pattern pattern
      Vector dl = Util.instance().get_device_list(pattern);
      //- For each device in dl
      Iterator it = dl.iterator();
      while (it.hasNext()) {
        Logger logger = ((DeviceImpl)it.next()).get_logger();
        if (logger == null) {
          String desc = "Internal error. Got invalid logger for device " + logger.getName();
          Except.throw_exception("API_InternalError", desc, "Logging::set_logging_level");
        }
        // set logger's level
        logger.setLevel(level);
        Util.out4.println("Logging level set to " + level.toString() + " for device " + logger.getName());
      } //  while it.hasNext
    } // for i
	}
457808
def get_logging_level(debug):
    """"""
    level = logging.INFO
    if debug:
        level = logging.DEBUG
    return level
973274
protected Level convertToJDK14Level(LogLevel logLevel) {
    Level level = Level.OFF;
    
    switch(logLevel) {
      case INFO:
        level = Level.INFO;
        break;
      case WARNING:
        level = Level.WARNING;
        break;
      case ERROR:
      case FATAL:
      case SEVERE:
        level = Level.SEVERE;
        break;
    }
    
    return level;
  }
1038369
private static Level translateLevel(final org.tinylog.Level level) {
		switch (level) {
			case TRACE:
				return Level.ALL;
			case DEBUG:
				return Level.FINER;
			case INFO:
				return Level.CONFIG;
			case WARN:
				return Level.WARNING;
			case ERROR:
				return Level.SEVERE;
			case OFF:
				return Level.OFF;
			default:
				throw new IllegalArgumentException("Unknown JUL severity level \"" + level + "\"");
		}
	}
538093
static public String fromLevel(int level, int length) {
        StringBuffer sb = new StringBuffer(length > 7 ? length : 7);
        switch (level) {
        case LogService.LOG_INFO:
            sb.append("info");
            break;
        case LogService.LOG_DEBUG:
            sb.append("debug");
            break;
        case LogService.LOG_WARNING:
            sb.append("Warning");
            break;
        case LogService.LOG_ERROR:
            sb.append("ERROR");
            break;
        case 0:
            sb.append("DEFAULT");
            break;
        default:
            sb.append("[");
            sb.append(level);
            sb.append("]");
        }
        for (int i = sb.length(); i < length; i++) {
            sb.append(" ");
        }
        return sb.toString();
    }
145068
public static void logLevel(String level) {
        if (!Arrays.asList("TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF").contains(level)) {
            throw new IllegalArgumentException("log level \"" + level + "\" is not legal it must be one of \"TRACE\", \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\", \"OFF\"");
        }
        System.setProperty(MOCKSERVER_LOG_LEVEL, level);
        MockServerLogger.initialiseLogLevels();
    }
222515
private function extract_log_objects_in_args( array $args, $hook_level ) {

		$logs = [];
		foreach ( $args as $arg ) {
			if ( $arg instanceof LogDataInterface ) {
				$logs[] = $this->maybe_raise_level( $hook_level, $arg );
			}

		}

		return $logs;
	}
1315604
protected void setupLogging(@Nullable final Level level) {
    // install JUL adapter
    SLF4JBridgeHandler.removeHandlersForRootLogger();
    SLF4JBridgeHandler.install();

    // conifgure gossip bootstrap loggers with target factory
    Log.configure(LoggerFactory.getILoggerFactory());
    log.debug("Logging setup; level: {}", level);
  }
1310355
@VisibleForTesting
  static Level getLogLevel(Throwable t) {
    if (t instanceof IOException && t.getMessage() != null) {
      for (String msg : QUIET_ERRORS) {
        if (t.getMessage().equals(msg)) {
          return Level.FINE;
        }
      }
    }
    return Level.INFO;
  }
435979
private static org.tinylog.Level translateLevel(final Level level) {
		if (level.intValue() <= Level.FINEST.intValue()) {
			return org.tinylog.Level.TRACE;
		} else if (level.intValue() <= Level.FINE.intValue()) {
			return org.tinylog.Level.DEBUG;
		} else if (level.intValue() <= Level.INFO.intValue()) {
			return org.tinylog.Level.INFO;
		} else if (level.intValue() <= Level.WARNING.intValue()) {
			return org.tinylog.Level.WARN;
		} else {
			return org.tinylog.Level.ERROR;
		}
	}
616793
private function convertLogLevelFromPSRToSyslog($severity)
    {
        switch ($severity) {
            case LogLevel::DEBUG:
                return LOG_DEBUG;
            case LogLevel::INFO:
                return LOG_INFO;
            case LogLevel::NOTICE:
                return LOG_NOTICE;
            case LogLevel::WARNING:
                return LOG_WARNING;
            case LogLevel::ERROR:
                return LOG_ERR;
            case LogLevel::CRITICAL:
                return LOG_CRIT;
            case LogLevel::ALERT:
                return LOG_ALERT;
            case LogLevel::EMERGENCY:
                return LOG_EMERG;
            default:
                return LOG_ERR;
        }
    }
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)))
1024044
def convert_level(self, record):
        """"""
        level = record.levelno
        if level >= logging.CRITICAL:
            return levels.CRITICAL
        if level >= logging.ERROR:
            return levels.ERROR
        if level >= logging.WARNING:
            return levels.WARNING
        if level >= logging.INFO:
            return levels.INFO
        return levels.DEBUG