Issue Type: Bug Bug
Affects Versions: 1.1.3
Assignee: Logback dev list
Components: logback-classic
Created: 20/May/15 10:32 AM
Description:

As can be seen from file ThrowableProxyConverter, Logback doesn't call exception's printStackTrace() method, but uses some custom stacktrace dumping procedure. This appears just fine for standard exceptions, but the problem is, this method is not final and can be overriden. As a result, for certain exceptions results of "standard" stacktrace dumping and Logback output differ.

Usecase important for me is Jython exceptions. They splice Python stacktrace into Java stacktrace by overriding printStackTrace().

For comparison, here are parts of the same exception stacktrace. How it appears with exception.printStackTrace (...):

...
at java.lang.Thread.run(Thread.java:745)
Caused by: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "test.py", line 3, in main
ValueError: this is a test error

at org.python.core.PyException.doRaise(PyException.java:219)
at org.python.core.Py.makeException(Py.java:1166)
...

How it appears in log file:

at java.lang.Thread.run(Thread.java:745)
Caused by: org.python.core.PyException: null
at org.python.core.PyException.doRaise(PyException.java:219)
at org.python.core.Py.makeException(Py.java:1166)
...

Logback probably does it for performance reasons, but in this case, for me at least, full stacktrace is infinitely more important than performance, because exceptions don't happen often anyway.

Project: logback
Priority: Major Major
Reporter: Paul Pogonyshev
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
logback-dev mailing list
logback-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev

Reply via email to