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

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Tue Mar 11 23:45:44 CET 2008


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 at qos.ch
        ReportedBy: joern at 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.



More information about the logback-dev mailing list