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