Here you can find the source of warn(String format, Object... arguments)
public static void warn(String format, Object... arguments)
//package com.java2s; //License from project: Apache License import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Main { public static void warn(String format, Object... arguments) { warn(innerGet(), format, arguments); }/*from ww w . j a v a2 s. c o m*/ public static void warn(Logger log, String format, Object... arguments) { log.warn(format, arguments); } public static void warn(Throwable e, String format, Object... arguments) { warn(innerGet(), e, format(format, arguments)); } public static void warn(Logger log, Throwable e, String format, Object... arguments) { log.warn(format(format, arguments), e); } private static Logger innerGet() { StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); return LoggerFactory.getLogger(stackTrace[3].getClassName()); } private static String format(String template, Object... values) { return String.format(template.replace("{}", "%s"), values); } }