Scott M Stark wrote:
It depends on what is generating the stack trace. In order to get this behavior there has to be a line by line emission of the stack trace using System.err.println() for each line rather than one System.err.println() with the entire stack trace as a message. What is the source of this?
You are right: I use e.printStackTrace(), and here is the code from Throwable.java:
public void printStackTrace(PrintStream s) { synchronized (s) { s.println(this); StackTraceElement[] trace = getOurStackTrace(); for (int i=0; i < trace.length; i++) s.println("\tat " + trace[i]);
Throwable ourCause = getCause(); if (ourCause != null) ourCause.printStackTraceAsCause(s, trace); }
println for class name and message, println for every entry.
Any ideas how to cut the corner here? Vlad
Why not just use Logger.error("Something blew up", e)? See http://logging.apache.org/log4j/docs/api/org/apache/log4j/Category.html#error(java.lang.Object,%20java.lang.Throwable)
-- Ryan Hoegg ISIS Networks http://www.isisnetworks.net/
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user