Here you can find the source of logException(Logger logger, String message, Throwable t)
public static void logException(Logger logger, String message, Throwable t)
//package com.java2s; //License from project: Open Source License import java.io.PrintWriter; import java.io.StringWriter; import java.util.logging.Logger; public class Main { public static void logException(Logger logger, String message, Throwable t) { logger.warning(message);//from w ww. j a v a2s. c o m logger.warning(excpToString(t)); } public static String excpToString(Throwable t) { StringWriter output = new StringWriter(); t.printStackTrace(new PrintWriter(output, false)); return output.toString(); } }