Perform single parameter substitution before logging the message of level
WARN according to the format outlined above.
321086
public void warn(String format, Object arg) {
        formatAndLog(LOG_LEVEL_WARN, format, arg, null);
    }
689163
private void logFailure(String message, Object... args) {
        totalFailures.inc();

        long total = totalFailures.get();

        // it can happen that 2 threads at the same conclude that the level should be warn because of the
        // non atomic int/get. This is an acceptable trade of since it is unlikely to happen and you only get
        // additional warning under log as a side effect.
        Level level = total % WARNING_LOG_FREQUENCY == 0
                ? Level.WARNING : Level.FINEST;

        if (logger.isLoggable(level)) {
            logger.log(level, String.format(message, args));
        }
    }
307375
public void w(String format, Object... args) {
    println(LogLevel.WARN, format, args);
  }
25744
public static void warn(String msg, Throwable t) {
        if (quietMode)
            return;

        System.err.println(WARN_PREFIX + msg);
        if (t != null) {
            t.printStackTrace();
        }
    }
345
public static void warn(Log log, String format, Object... arguments) {
		warn(log, null, format, arguments);
	}
306176
def warn(self, msg, *args, **kwargs):
        """"""
        self.log(self.WARN, msg, *args, **kwargs)
216190
public static void warn(Object message) {
		log(Level.WARN, message, null, (Object[])null);
	}
849544
def log_warn(message, args):
    """"""
    get_logger(DEFAULT_LOGGER, log_creation=False).log(logging.WARNING, message, *args)
226898
public static void warn(Logger log, String methodName, Object... params) {
        if (log.isWarnEnabled())
            log.warn(buildMethodLogString(methodName, params));
    }
707043
public void warn( String format, Object arg )
    {
        if( m_delegate.isWarnEnabled() )
        {
            FormattingTuple tuple = MessageFormatter.format( format, arg );
            m_delegate.warn( tuple.getMessage(), tuple.getThrowable() );
        }
    }
1233855
@Override
    public void warn(Throwable t, String msgFormat, Object... args)
    {
        m_logger.warn(String.format(msgFormat, args), t);
    }
1234142
def initialise_logging(level: str, target: str, short_format: bool):
    """"""
    try:
        log_level = getattr(logging, level)
    except AttributeError:
        raise SystemExit(
            "invalid log level %r, expected any of 'DEBUG', 'INFO', 'WARNING', 'ERROR' or 'CRITICAL'" % level
        )
    handler = create_handler(target=target)
    logging.basicConfig(
        level=log_level,
        format='%(asctime)-15s (%(process)d) %(message)s' if not short_format else '%(message)s',
        datefmt='%Y-%m-%d %H:%M:%S',
        handlers=[handler]
    )
926804
def to_log_level(value):
        
        if value == None:
            return LogLevel.Info

        value = str(value).upper()
        if ("0" == value) or ("NOTHING" == value) or ("NONE" == value):
            return LogLevel.Nothing
        elif ("1" == value) or ("FATAL" == value):
            return LogLevel.Fatal
        elif ("2" == value) or ("ERROR" == value):
            return LogLevel.Error
        elif ("3" == value) or ("WARN" == value) or ("WARNING" == value):
            return LogLevel.Warn
        elif ("4" == value) or ("INFO" == value):
            return LogLevel.Info
        elif ("5" == value) or ("DEBUG" == value):
            return LogLevel.Debug
        elif ("6" == value) or ("TRACE" == value):
            return LogLevel.Trace
        else:
            return LogLevel.Info
261614
public void log(int level, String message) {

        switch (level) {
        case LOG_DEBUG:
            delegate.debug(message);
            break;
        case LOG_ERROR:
            delegate.error(message);
            break;
        case LOG_INFO:
            delegate.info(message);
            break;
        case LOG_WARNING:
            delegate.warn(message);
            break;
        default:
            break;
        }
    }
85708
def log_level(self, level):
        
        if 0 <= level <= 7:
            for i in range(level+1):
                self.add_match(PRIORITY="%d" % i)
        else:
            raise ValueError("Log level must be 0 <= level <= 7")
237039
def log(self, message, level=LOG_INFO):
        
        assert level in [
            self.LOG_ERROR,
            self.LOG_INFO,
            self.LOG_WARNING,
        ], "level must be LOG_ERROR, LOG_INFO or LOG_WARNING"

        # nicely format logs if we can using pretty print
        if isinstance(message, (dict, list, set, tuple)):
            message = pformat(message)
        # start on new line if multi-line output
        try:
            if "\n" in message:
                message = "\n" + message
        except:  # noqa e722
            pass
        message = "Module `{}`: {}".format(self._module.module_full_name, message)
        self._py3_wrapper.log(message, level)
867359
private static void  warn(String format, Object... args)
   {
      Log.w(TAG, String.format(format, args));
   }