Here you can find the source of testLogError(String errorMessage, Exception ex)
public static void testLogError(String errorMessage, Exception ex)
//package com.java2s; //License from project: Apache License import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Main { public static Logger testLog = LoggerFactory.getLogger("test_logger"); public static boolean isPrintStackTrace = true; public static void testLogError(String errorMessage, Exception ex) { if (testLog != null) { testLog.error(errorMessage); }//from w w w . j a v a 2s . c o m if (isPrintStackTrace && ex != null && testLog != null) { testLog.error(ex.getMessage(), ex); } } }