
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Logback: the generic, reliable, fast and flexible logging framework.". The branch, master has been updated via b1e595bcf4ff91adeab7e8825f6de55818b39993 (commit) from f0b1a778e9000cadf586790d670cb75ad36bdf3a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=b1e595bcf4ff91adeab7e8825... http://github.com/ceki/logback/commit/b1e595bcf4ff91adeab7e8825f6de55818b399... commit b1e595bcf4ff91adeab7e8825f6de55818b39993 Author: Ceki Gulcu <ceki@qos.ch> Date: Tue Sep 20 23:47:52 2011 +0200 documenting rootException/LBCLASSIC-217 diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/pattern/PackageTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/pattern/PackageTest.java index f5ff5af..64228e9 100644 --- a/logback-classic/src/test/java/ch/qos/logback/classic/pattern/PackageTest.java +++ b/logback-classic/src/test/java/ch/qos/logback/classic/pattern/PackageTest.java @@ -18,10 +18,11 @@ import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) -@SuiteClasses( { ConverterTest.class, - TargetLengthBasedClassNameAbbreviatorTest.class, MDCConverterTest.class, - MarkerConverterTest.class, ExtendedThrowableProxyConverterTest.class, - ThrowableProxyConverterTest.class }) +@SuiteClasses({ConverterTest.class, + TargetLengthBasedClassNameAbbreviatorTest.class, MDCConverterTest.class, + MarkerConverterTest.class, ExtendedThrowableProxyConverterTest.class, + ThrowableProxyConverterTest.class, + RootCauseFirstThrowableProxyConverterTest.class}) public class PackageTest { } \ No newline at end of file diff --git a/logback-core/src/main/java/ch/qos/logback/core/CoreConstants.java b/logback-core/src/main/java/ch/qos/logback/core/CoreConstants.java index ba67c65..0afe865 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/CoreConstants.java +++ b/logback-core/src/main/java/ch/qos/logback/core/CoreConstants.java @@ -69,7 +69,7 @@ public class CoreConstants { */ public final static Class<?>[] EMPTY_CLASS_ARRAY = new Class[]{}; public final static String CAUSED_BY = "Caused by: "; - + public final static String WRAPPED_BY = "Wrapped by: "; public final static char PERCENT_CHAR = '%'; public static final char LEFT_PARENTHESIS_CHAR = '('; diff --git a/logback-site/src/site/pages/manual/layouts.html b/logback-site/src/site/pages/manual/layouts.html index 6d55557..3e9a025 100644 --- a/logback-site/src/site/pages/manual/layouts.html +++ b/logback-site/src/site/pages/manual/layouts.html @@ -989,7 +989,7 @@ Caller+2 at mainPackage.ConfigTester.main(ConfigTester.java:38)</pre> </td> <td> - <p >Outputs the value associated with a context + <p>Outputs the value associated with a context property named <em>key</em>. If <em>key</em> is not a property of the logger context, then <em>key</em> will be looked up in the System properties. </p> @@ -1020,11 +1020,46 @@ Caller+2 at mainPackage.ConfigTester.main(ConfigTester.java:38)</pre> all dots in the logger or the message of the event with a forward slash. </p> - </td> </tr> + + <tr> + <td align="center"> + <a name="rootException" href="#rootException"> + <b>rEx</b>{<em>depth</em>} <br /> + <b>rootException</b>{<em>depth</em>} <br /> + <br /> + <b>rEx</b>{depth, evaluator-1, ..., evaluator-n} <br /> + <b>rootException</b>{depth, evaluator-1, ..., evaluator-n}</a> + </td> + + <td> + <p>Outputs the stack trace of the exception associated with + the logging event, if any. The root cause will be output + first instead of the standard "root cause last". Here is a + sample output (edited for space): + </p> + + <pre class="small">java.lang.NullPointerException + at com.xyz.Wombat(Wombat.java:57) ~[wombat-1.3.jar:1.3] + at com.xyz.Wombat(Wombat.java:76) ~[wombat-1.3.jar:1.3] +Wrapped by: org.springframework.BeanCreationException: Error creating bean with name 'wombat': + at org.springframework.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) [spring-2.0.jar:2.0] + at org.springframework.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170) [spring-2.0.jar:2.0] + at org.apache.catalina.StandardContext.listenerStart(StandardContext.java:3934) [tomcat-6.0.26.jar:6.0.26] +</pre> + + <p>The %rootException converter admits the same optional + parameters as the %xException converter described above, + including depth and eveluators. It outputs also packaging + information. In short, %rootException is very similar to + %xException, only the order of exception output is reversed. + </p> + </td> + </tr> + </table> diff --git a/logback-site/src/site/pages/news.html b/logback-site/src/site/pages/news.html index 7cfd392..fee2e7a 100644 --- a/logback-site/src/site/pages/news.html +++ b/logback-site/src/site/pages/news.html @@ -38,6 +38,15 @@ reported by Rafael Diaz Maurin. </p> + <p>Logback-classic now supports printing stack traces "root cause + first" instead of the standard "root cause last". See the + documentaiton for <a + href="manual/layouts.html#rootException">%rootException</a> + converter for further details. The <code>%rootException</code> + converter was contributed by Tomasz Nurkiewicz in relation with <a + href="http://jira.qos.ch/browse/LBCLASSIC-217">LBCLASSIC-217</a>. + </p> + <p>In the <code>ILoggingEvent</code> interface the <code>getMDC</code> method is now deprecated and replaced by <code>getMDCPropertyMap</code>. The latter method was already part ----------------------------------------------------------------------- Summary of changes: .../qos/logback/classic/pattern/PackageTest.java | 9 +++-- .../java/ch/qos/logback/core/CoreConstants.java | 2 +- logback-site/src/site/pages/manual/layouts.html | 39 +++++++++++++++++++- logback-site/src/site/pages/news.html | 9 +++++ 4 files changed, 52 insertions(+), 7 deletions(-) hooks/post-receive -- Logback: the generic, reliable, fast and flexible logging framework.