Here you can find the source of warn(String msg)
public static void warn(String msg)
//package com.java2s; import org.slf4j.Logger; public class Main { private static Logger logger = null; public static void warn(String msg) { StackTraceElement se = Thread.currentThread().getStackTrace()[2]; String clazzMethod = " " + se.getClassName() + "." + se.getMethodName() + "(" + se.getFileName() + ":" + se.getLineNumber() + ") "; String log = clazzMethod + " " + " MSG: " + msg; logger.warn(log);/* w w w . jav a 2s .c o m*/ } }