[slf4j-dev] svn commit: r967 - in slf4j/trunk: slf4j-converter slf4j-jcl/src/main/java/org/slf4j/impl slf4j-site/src/site/pages

ceki at slf4j.org ceki at slf4j.org
Thu Feb 7 21:33:39 CET 2008


Author: ceki
Date: Thu Feb  7 21:33:38 2008
New Revision: 967

Modified:
   slf4j/trunk/slf4j-converter/pom.xml
   slf4j/trunk/slf4j-jcl/src/main/java/org/slf4j/impl/JCLLoggerAdapter.java
   slf4j/trunk/slf4j-site/src/site/pages/faq.html
   slf4j/trunk/slf4j-site/src/site/pages/index.html
   slf4j/trunk/slf4j-site/src/site/pages/manual.html
   slf4j/trunk/slf4j-site/src/site/pages/news.html

Log:
- improvements to documentation
- minor license correction

Modified: slf4j/trunk/slf4j-converter/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-converter/pom.xml	(original)
+++ slf4j/trunk/slf4j-converter/pom.xml	Thu Feb  7 21:33:38 2008
@@ -5,9 +5,9 @@
   
  
 	<parent>
-		<groupId>org.slf4j</groupId>
-    <artifactId>slf4j-parent</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
+	  <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-parent</artifactId>
+      <version>1.5.0-SNAPSHOT</version>
 	</parent>
 	
 	<modelVersion>4.0.0</modelVersion>

Modified: slf4j/trunk/slf4j-jcl/src/main/java/org/slf4j/impl/JCLLoggerAdapter.java
==============================================================================
--- slf4j/trunk/slf4j-jcl/src/main/java/org/slf4j/impl/JCLLoggerAdapter.java	(original)
+++ slf4j/trunk/slf4j-jcl/src/main/java/org/slf4j/impl/JCLLoggerAdapter.java	Thu Feb  7 21:33:38 2008
@@ -1,36 +1,28 @@
-/*
- * Copyright (c) 2004-2005 SLF4J.ORG
- * Copyright (c) 2004-2005 QOS.ch
- *
+/* 
+ * Copyright (c) 2004-2008 QOS.ch
  * All rights reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
+ * 
+ * Permission is hereby granted, free  of charge, to any person obtaining
+ * a  copy  of this  software  and  associated  documentation files  (the
  * "Software"), to  deal in  the Software without  restriction, including
  * without limitation  the rights to  use, copy, modify,  merge, publish,
- * distribute, and/or sell copies of  the Software, and to permit persons
- * to whom  the Software is furnished  to do so, provided  that the above
- * copyright notice(s) and this permission notice appear in all copies of
- * the  Software and  that both  the above  copyright notice(s)  and this
- * permission notice appear in supporting documentation.
- *
+ * distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ * permit persons to whom the Software  is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The  above  copyright  notice  and  this permission  notice  shall  be
+ * included in all copies or substantial portions of the Software.
+ * 
  * THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
  * EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR  A PARTICULAR PURPOSE AND NONINFRINGEMENT
- * OF  THIRD PARTY  RIGHTS. IN  NO EVENT  SHALL THE  COPYRIGHT  HOLDER OR
- * HOLDERS  INCLUDED IN  THIS  NOTICE BE  LIABLE  FOR ANY  CLAIM, OR  ANY
- * SPECIAL INDIRECT  OR CONSEQUENTIAL DAMAGES, OR  ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS  OF USE, DATA OR PROFITS, WHETHER  IN AN ACTION OF
- * CONTRACT, NEGLIGENCE  OR OTHER TORTIOUS  ACTION, ARISING OUT OF  OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Except as  contained in  this notice, the  name of a  copyright holder
- * shall not be used in advertising or otherwise to promote the sale, use
- * or other dealings in this Software without prior written authorization
- * of the copyright holder.
- *
+ * MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+
 package org.slf4j.impl;
 
 import org.apache.commons.logging.Log;

Modified: slf4j/trunk/slf4j-site/src/site/pages/faq.html
==============================================================================
--- slf4j/trunk/slf4j-site/src/site/pages/faq.html	(original)
+++ slf4j/trunk/slf4j-site/src/site/pages/faq.html	Thu Feb  7 21:33:38 2008
@@ -108,7 +108,14 @@
       FATAL level?  </a></li>
 
       <li><a href="#trace">Why was the TRACE level introduced only in
-        SLF4J version 1.4.0?  </a></li></ol>
+        SLF4J version 1.4.0?  </a></li>
+
+      <li><a href="#i18n">Does the SLF4J logging API support I18N
+      (internationalization)? </a></li>
+
+        
+    </ol>
+
 
 
       <b>Implementing the SLF4J API</b>
@@ -805,6 +812,55 @@
         </table>
 
       </dd>
+
+      <dt>
+        <a name="i18n">Does the SLF4J logging API support I18N
+        (internationalization)?
+        </a>
+      </dt>
+        
+      <dd>
+        <p>No. SLF4J does not offer any particular support for
+        I18N. However, nothing prevents you from implementing i18n
+        support around the SLF4J API.</p>
+
+        <p>As suggested by Sebastien Davids in <a
+        href="http://bugzilla.slf4j.org/show_bug.cgi?id=50">bug report
+        50</a>, a possible pattern might be:</p>
+
+        <p class="source">
+class MyClass {
+
+  ResourceBundle bundle = ResourceBundle.getBundle("my.package.messages");
+  Logger logger =  LoggerFactory.getLogger(MyClass.class);
+
+  void method() {
+     if (logger.isWarnEnabled()) {
+       MessageFormat format = new MessageFormat(bundle.getString("<b>my_message_key</b>"));
+       logger.warn(format.format(new Object[] { new Date(), 1 }));
+     }
+  }
+}</p>
+
+      <p>Where <code>my_message_key</code> is defined as</p>
+      <p class="source"><b>my_message_key</b>=my text to be i18n {1,date,short} {0,number,00}</p>
+
+      
+
+        
+      </dd>
+
+      
+
+      <table border="0">
+        <tr>
+          <td align="right">
+            <a href="#top">[top]</a>
+          </td>
+        </tr>
+      </table>
+
+
     </dl>
   </div>
 

Modified: slf4j/trunk/slf4j-site/src/site/pages/index.html
==============================================================================
--- slf4j/trunk/slf4j-site/src/site/pages/index.html	(original)
+++ slf4j/trunk/slf4j-site/src/site/pages/index.html	Thu Feb  7 21:33:38 2008
@@ -37,7 +37,7 @@
   </p>
 
   <p>Logging systems can either choose to implement the the SLF4J
-  interfaces directly, &agrave; la <a
+  interfaces directly, e.g. <a
   href="http://logback.qos.ch">logback</a> or <a
   href="api/org/slf4j/impl/SimpleLogger.html">SimpleLogger</a>. Alternatively,
   it is possible (and rather easy) to write SLF4J adapters for a given

Modified: slf4j/trunk/slf4j-site/src/site/pages/manual.html
==============================================================================
--- slf4j/trunk/slf4j-site/src/site/pages/manual.html	(original)
+++ slf4j/trunk/slf4j-site/src/site/pages/manual.html	Thu Feb  7 21:33:38 2008
@@ -149,6 +149,10 @@
         forcing these upon your users as dependencies.
         </p>
 
+        <p>As of SLF4J version 1.5.0, SLF4J provides MDC support for
+        java.util.logging (JDK 1.4 logging) as well. 
+        </p>
+
         <p>For more information on MDC please see the <a
         href="http://logback.qos.ch/manual/mdc.html">chapter on
         MDC</a> in the logback manual.
@@ -267,10 +271,9 @@
             </td>
 
             <td>SLF4J supports popular logging systems, namely log4j,
-            JDK 1.4 logging, Simple logging and NOP whereas the <a
-            href="http://logback.qos.ch">logback</a> API supports
-            SLF4J natively.
-            </td>
+            JDK 1.4 logging, Simple logging and NOP. The <a
+            href="http://logback.qos.ch">logback</a> project supports
+            SLF4J natively.  </td>
 
           </tr>
 

Modified: slf4j/trunk/slf4j-site/src/site/pages/news.html
==============================================================================
--- slf4j/trunk/slf4j-site/src/site/pages/news.html	(original)
+++ slf4j/trunk/slf4j-site/src/site/pages/news.html	Thu Feb  7 21:33:38 2008
@@ -62,7 +62,7 @@
   <p>In org.apache.log4j.Category class as implemented in the
   log4j-over-slf4j module, calls to the trace() printing method are
   now correctly mapped to SLF4J's trace() printing method (instead of
-  debug()). Superflous printing methods with the signature
+  debug()). Superfluous printing methods with the signature
   <code>xxxx(Object, Object)</code> and <code>xxxx(String, Object,
   Object)</code> have been removed.
   </p>
@@ -74,6 +74,21 @@
   </p>
 
 
+  <p>Fixed <a href="http://bugzilla.slf4j.org/show_bug.cgi?id=69">bug
+  69</a> reported by Joern Huxhorn, who graciously supplied the fix as
+  well as a test case. The <code>add</code> method in
+  <code>BasicMarker</code> class now corectly prevents multiple
+  addition of the same child. Moreover, the <code>remove</code> method
+  now correcty removes the specified child marker.
+  </p>
+
+  <p>Fixed <a href="http://bugzilla.slf4j.org/show_bug.cgi?id=41">bug
+  41</a> reported by Sebastian Davids. The manifest files of various
+  projects now mention J2SE-1.3 as the required execution
+  envirionment.
+  </p>
+
+
   <hr noshade="noshade" size="1"/>
 
   <h3>August 20th, 2007 - Release of SLF4J 1.4.3</h3>



More information about the slf4j-dev mailing list