[Bug 136] New: ThrowableInformation should keep the Throwable cause hierarchy intact.

http://bugzilla.qos.ch/show_bug.cgi?id=136 Summary: ThrowableInformation should keep the Throwable cause hierarchy intact. Product: logback-classic Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P1 Component: Other AssignedTo: logback-dev@qos.ch ReportedBy: joern@huxhorn.de Instead of a String representation of the whole Throwable stack trace incl. cause ThrowableInformation should instead look like this: public class ThrowableInformation implements Serializable { String throwableClassName; String message; StackTraceElement[] stackTrace; ThrowableInformation cause; } I omitted get/set and private in this example. StackTraceElement is perfectly Serializable and did also receive a public c'tor in Java 5 so I guess that the current ThrowableInformation is more or less a relict of log4j which had to stay compatible with older Java versions. You could obviously keep the getThrowableStrRep() method for compatibility. This bug is somewhat related to bug #134 because I think that ThrowableInformation should also, as LoggingEvent, be just a dumb data container with no real logic. The logic to extract the relevant StackTraceElements should IMHO be moved either into Logger or into a static factory method of ThrowableInformation. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=136 ------- Comment #1 from joern@huxhorn.de 2008-03-13 17:47 ------- It would also be sufficient - at least for my current use case ;) - to add a public Throwable getThrowable() method so I could extract the necessary information before the event is serialized. The alternative would be another setAccessible hack. I'm currently defining an XML Schema for LoggingEvents which I'll post to the dev-list for comments soon. I need it because I want to define a LoggingRepository webservice, i.e. a central point where all logs will be collected and can be accessed from lilith (aka lumberjack). -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
bugzilla-daemon@pixie.qos.ch