There are even more differences regarding suppressed exceptions.
Below are some example outputs showing off the differences between log4j 1.2.17 and logback 1.0.13. The code producing these is conceptually identical but the <log4j:throwable> content is way different.
log4j-1.2.17
<log4j:event logger="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" timestamp="1382730402315" level="DEBUG" thread="main"><log4j:message><![CDATA[Just an exception!]]></log4j:message><log4j:NDC><![CDATA[NDC1 NDC2 NDC with spaces...]]></log4j:NDC><log4j:throwable><![CDATA[java.lang.RuntimeException: Hi.
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:58)
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:16)
at de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:80)
Suppressed: java.lang.RuntimeException
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:59)
... 2 more
Suppressed: java.lang.RuntimeException: Single line
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:60)
... 2 more
Suppressed: java.lang.RuntimeException: Multi
line
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:61)
... 2 more
]]></log4j:throwable><log4j:locationInfo class="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" method="execute" file="Log4jSandbox.java" line="20"/><log4j:properties><log4j:data name="key1" value="value1"/><log4j:data name="key2" value="value2"/></log4j:properties></log4j:event><log4j:event logger="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" timestamp="1382730402316" level="DEBUG" thread="main"><log4j:message><![CDATA[Exception with simple message!]]></log4j:message><log4j:NDC><![CDATA[NDC1 NDC2 NDC with spaces...]]></log4j:NDC><log4j:throwable><![CDATA[java.lang.RuntimeException: Hello
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:29)
at de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:80)
Caused by: java.lang.RuntimeException: Hi.
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:58)
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:25)
... 1 more
Suppressed: java.lang.RuntimeException
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:59)
... 2 more
Suppressed: java.lang.RuntimeException: Single line
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:60)
... 2 more
Suppressed: java.lang.RuntimeException: Multi
line
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:61)
... 2 more
]]></log4j:throwable><log4j:locationInfo class="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" method="execute" file="Log4jSandbox.java" line="30"/><log4j:properties><log4j:data name="key1" value="value1"/><log4j:data name="key2" value="value2"/></log4j:properties></log4j:event><log4j:event logger="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" timestamp="1382730402318" level="DEBUG" thread="main"><log4j:message><![CDATA[Exception with multiline message!]]></log4j:message><log4j:NDC><![CDATA[NDC1 NDC2 NDC with spaces...]]></log4j:NDC><log4j:throwable><![CDATA[java.lang.RuntimeException: Multi
line
message
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:39)
at de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:80)
Caused by: java.lang.RuntimeException: Hi.
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:58)
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:35)
... 1 more
Suppressed: java.lang.RuntimeException
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:59)
... 2 more
Suppressed: java.lang.RuntimeException: Single line
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:60)
... 2 more
Suppressed: java.lang.RuntimeException: Multi
line
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:61)
... 2 more
]]></log4j:throwable><log4j:locationInfo class="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" method="execute" file="Log4jSandbox.java" line="40"/><log4j:properties><log4j:data name="key1" value="value1"/><log4j:data name="key2" value="value2"/></log4j:properties></log4j:event><log4j:event logger="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" timestamp="1382730402320" level="DEBUG" thread="main"><log4j:message><![CDATA[Exception with no message!]]></log4j:message><log4j:NDC><![CDATA[NDC1 NDC2 NDC with spaces...]]></log4j:NDC><log4j:throwable><![CDATA[java.lang.RuntimeException: java.lang.RuntimeException: Hi.
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:49)
at de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:80)
Caused by: java.lang.RuntimeException: Hi.
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:58)
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:45)
... 1 more
Suppressed: java.lang.RuntimeException
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:59)
... 2 more
Suppressed: java.lang.RuntimeException: Single line
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:60)
... 2 more
Suppressed: java.lang.RuntimeException: Multi
line
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.foobar(Log4jSandbox.java:61)
... 2 more
]]></log4j:throwable><log4j:locationInfo class="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" method="execute" file="Log4jSandbox.java" line="50"/><log4j:properties><log4j:data name="key1" value="value1"/><log4j:data name="key2" value="value2"/></log4j:properties></log4j:event><log4j:event logger="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" timestamp="1382730402323" level="DEBUG" thread="main"><log4j:message><![CDATA[Plain exception!]]></log4j:message><log4j:NDC><![CDATA[NDC1 NDC2 NDC with spaces...]]></log4j:NDC><log4j:throwable><![CDATA[java.lang.RuntimeException
at de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass.execute(Log4jSandbox.java:53)
at de.huxhorn.lilith.sandbox.Log4jSandbox.main(Log4jSandbox.java:80)
]]></log4j:throwable><log4j:locationInfo class="de.huxhorn.lilith.sandbox.Log4jSandbox$InnerClass" method="execute" file="Log4jSandbox.java" line="53"/><log4j:properties><log4j:data name="key1" value="value1"/><log4j:data name="key2" value="value2"/></log4j:properties></log4j:event>
logback-1.0.13
<log4j:event logger="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
timestamp="1382730614293" level="DEBUG" thread="main">
<log4j:message><![CDATA[Just an exception!]]></log4j:message><log4j:throwable><![CDATA[ at de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass.foobar(LogbackClassicSandbox.java:60)
at de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass.execute(LogbackClassicSandbox.java:18)
at de.huxhorn.lilith.sandbox.LogbackClassicSandbox.main(LogbackClassicSandbox.java:82)
]]></log4j:throwable>
<log4j:locationInfo class="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
method="execute" file="LogbackClassicSandbox.java" line="22"/>
</log4j:event>
<log4j:event logger="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
timestamp="1382730614298" level="DEBUG" thread="main">
<log4j:message><![CDATA[Exception with simple message!]]></log4j:message><log4j:throwable><![CDATA[ at de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass.execute(LogbackClassicSandbox.java:31)
at de.huxhorn.lilith.sandbox.LogbackClassicSandbox.main(LogbackClassicSandbox.java:82)
]]></log4j:throwable>
<log4j:locationInfo class="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
method="execute" file="LogbackClassicSandbox.java" line="32"/>
</log4j:event>
<log4j:event logger="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
timestamp="1382730614307" level="DEBUG" thread="main">
<log4j:message><![CDATA[Exception with multiline message!]]></log4j:message><log4j:throwable><![CDATA[ at de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass.execute(LogbackClassicSandbox.java:41)
at de.huxhorn.lilith.sandbox.LogbackClassicSandbox.main(LogbackClassicSandbox.java:82)
]]></log4j:throwable>
<log4j:locationInfo class="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
method="execute" file="LogbackClassicSandbox.java" line="42"/>
</log4j:event>
<log4j:event logger="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
timestamp="1382730614316" level="DEBUG" thread="main">
<log4j:message><![CDATA[Exception with no message!]]></log4j:message><log4j:throwable><![CDATA[ at de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass.execute(LogbackClassicSandbox.java:51)
at de.huxhorn.lilith.sandbox.LogbackClassicSandbox.main(LogbackClassicSandbox.java:82)
]]></log4j:throwable>
<log4j:locationInfo class="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
method="execute" file="LogbackClassicSandbox.java" line="52"/>
</log4j:event>
<log4j:event logger="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
timestamp="1382730614323" level="DEBUG" thread="main">
<log4j:message><![CDATA[Plain exception!]]></log4j:message><log4j:throwable><![CDATA[ at de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass.execute(LogbackClassicSandbox.java:55)
at de.huxhorn.lilith.sandbox.LogbackClassicSandbox.main(LogbackClassicSandbox.java:82)
]]></log4j:throwable>
<log4j:locationInfo class="de.huxhorn.lilith.sandbox.LogbackClassicSandbox$InnerClass"
method="execute" file="LogbackClassicSandbox.java" line="55"/>
</log4j:event>
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
There are even more differences regarding suppressed exceptions.
Below are some example outputs showing off the differences between log4j 1.2.17 and logback 1.0.13. The code producing these is conceptually identical but the <log4j:throwable> content is way different.
log4j-1.2.17
logback-1.0.13