[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch, master, updated. v1.5.11-18-g35ca85d

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Wed Apr 21 18:41:48 CEST 2010


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 "SLF4J: Simple Logging Facade for Java".

The branch, master has been updated
       via  35ca85dfaa1c2933619f9eeef86c907223b55a96 (commit)
      from  775c6a59df22c048231b8ba31995e4ef79311663 (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=slf4j.git;a=commit;h=35ca85dfaa1c2933619f9eeef86c907223b55a96
http://github.com/ceki/slf4j/commit/35ca85dfaa1c2933619f9eeef86c907223b55a96

commit 35ca85dfaa1c2933619f9eeef86c907223b55a96
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Wed Apr 21 17:18:25 2010 +0200

    - minor editing in MessageFormatterPerfTest
    - added blurb about bug 70

diff --git a/slf4j-api/src/test/java/org/slf4j/helpers/MessageFormatterPerfTest.java b/slf4j-api/src/test/java/org/slf4j/helpers/MessageFormatterPerfTest.java
index fbec292..5077c57 100644
--- a/slf4j-api/src/test/java/org/slf4j/helpers/MessageFormatterPerfTest.java
+++ b/slf4j-api/src/test/java/org/slf4j/helpers/MessageFormatterPerfTest.java
@@ -36,9 +36,15 @@ public class MessageFormatterPerfTest extends TestCase {
     BogoPerf.assertDuration(duration, referencePerf, REFERENCE_BIPS);
   }
 
+  public void testSLF4JPerf_TwoArg() {
+    slf4jMessageFormatter_TwoArg(RUN_LENGTH);
+    double duration = slf4jMessageFormatter_TwoArg(RUN_LENGTH);
+    long referencePerf = 60;
+    BogoPerf.assertDuration(duration, referencePerf, REFERENCE_BIPS);
+  }
+
+  
   public double slf4jMessageFormatter_OneArg(long len) {
-    String s = "";
-    s += ""; // keep compiler happy
     long start = System.nanoTime();
     for (int i = 0; i < len; i++) {
       final FormattingTuple tp = MessageFormatter.format("This is some rather short message {} ", i1);
@@ -52,14 +58,6 @@ public class MessageFormatterPerfTest extends TestCase {
     return (end - start)/(1000*1000.0);
   }
   
-  public void testSLF4JPerf_TwoArg() {
-    slf4jMessageFormatter_TwoArg(RUN_LENGTH);
-    double duration = slf4jMessageFormatter_TwoArg(RUN_LENGTH);
-    System.out.println("duration2=" + duration);
-    long referencePerf = 60;
-    BogoPerf.assertDuration(duration, referencePerf, REFERENCE_BIPS);
-  }
-
   public double slf4jMessageFormatter_TwoArg(long len) {
     long start = System.nanoTime();
     for (int i = 0; i < len; i++) {
diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html
index 24b0b39..796b504 100644
--- a/slf4j-site/src/site/pages/news.html
+++ b/slf4j-site/src/site/pages/news.html
@@ -6,9 +6,11 @@
     <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
     <title>SLF4J News</title>
     <link rel="stylesheet" type="text/css" media="screen" href="css/site.css" />
+    <link rel="stylesheet" type="text/css" href="css/prettify.css" />
   </head>
-  <body>
+ <body onload="prettyPrint()">
     <script type="text/javascript">prefix='';</script>
+    <script type="text/javascript" src="js/prettify.js"></script>
     
     <script src="templates/header.js" type="text/javascript"></script>
     <div id="left">
@@ -34,6 +36,36 @@
    series is expected to require JDK 1.5 or later.
    </p>
 
+   <p>Note that as of SLF4J version 1.6.0, in the absence of an SLF4J
+   binding, slf4j-api will default to a no-operation implementation
+   discarding all log requests. Thus, instead of throwing an
+   exception, SLF4J will emit a single warning message about the
+   absence of a binding and proceed to discard all log requests
+   without further protest.
+   </p>
+
+   <p>In the presence of multiple parameters and if the last argument
+   in a logging statement is an exception or more precisely of type
+   <code>java.lang.Throwable</code>, then SLF4J will now presume that
+   the user wants the last argument to be treated as an exception and
+   not a simple parameters. For example, in the following catch
+   clause:
+   </p>
+   
+   <pre class="prettyprint">try {
+  ..
+  } catch(IOException e) {
+    logger.error("Failed connect to {}", hostname, e);
+  }</pre>
+   
+   <p>the <code>IOException</code> 'e' will now be treated as an
+   exception and have its stack trace printed out. In previous
+   versions of SLF4J, the exception was treated as an unused
+   parameter. This fixes <a
+   href="http://bugzilla.slf4j.org/show_bug.cgi?id=70">bug 70</a>
+   submitted by Joern Huxhorn who also provided the relevant patch.
+   </p>
+  
    <p>The <code>log</code> method in <code>LocationAwareLogger</code>
    interface now admits an additional parameter of type
    <code>Object[]</code> representing additional arguments of the log
@@ -42,13 +74,6 @@
    with 1.6.x must be used.
    </p>
 
-   <p>Note that as of SLF4J version 1.6.0, in the absence of an SLF4J
-   binding, slf4j-api will default to a no-operation implementation
-   discarding all log requests. Thus, instead of throwing an
-   exception, SLF4J will emit a single warning message about the
-   absence of a binding and proceed to discard all log requests
-   without further protest.
-   </p>
 
    <p>Fixed <a
    href="http://bugzilla.slf4j.org/show_bug.cgi?id=150">bug 150</a> by

-----------------------------------------------------------------------

Summary of changes:
 .../slf4j/helpers/MessageFormatterPerfTest.java    |   18 ++++-----
 slf4j-site/src/site/pages/news.html                |   41 ++++++++++++++++----
 2 files changed, 41 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
SLF4J: Simple Logging Facade for Java


More information about the slf4j-dev mailing list