[slf4j-dev] svn commit: r832 - in slf4j/trunk: . jcl104-over-slf4j osgi-over-slf4j slf4j-api slf4j-api/src/main/java/org/slf4j slf4j-archetype slf4j-converter slf4j-jcl slf4j-jdk14 slf4j-log4j12 slf4j-log4j12/src/test/java/org/slf4j slf4j-nop slf4j-osgi-integration-test slf4j-osgi-test-bundle slf4j-simple slf4j-site slf4j-site/src/site/pages
ceki at slf4j.org
ceki at slf4j.org
Wed Jul 4 21:52:46 CEST 2007
Author: ceki
Date: Wed Jul 4 21:52:45 2007
New Revision: 832
Modified:
slf4j/trunk/jcl104-over-slf4j/pom.xml
slf4j/trunk/osgi-over-slf4j/pom.xml
slf4j/trunk/pom.xml
slf4j/trunk/slf4j-api/pom.xml
slf4j/trunk/slf4j-api/src/main/java/org/slf4j/MDC.java
slf4j/trunk/slf4j-archetype/pom.xml
slf4j/trunk/slf4j-converter/pom.xml
slf4j/trunk/slf4j-jcl/pom.xml
slf4j/trunk/slf4j-jdk14/pom.xml
slf4j/trunk/slf4j-log4j12/pom.xml
slf4j/trunk/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java
slf4j/trunk/slf4j-nop/pom.xml
slf4j/trunk/slf4j-osgi-integration-test/pom.xml
slf4j/trunk/slf4j-osgi-test-bundle/pom.xml
slf4j/trunk/slf4j-simple/pom.xml
slf4j/trunk/slf4j-site/pom.xml
slf4j/trunk/slf4j-site/src/site/pages/manual.html
slf4j/trunk/slf4j-site/src/site/pages/news.html
Log:
snapshot of SLF4J 1.4.1
Modified: slf4j/trunk/jcl104-over-slf4j/pom.xml
==============================================================================
--- slf4j/trunk/jcl104-over-slf4j/pom.xml (original)
+++ slf4j/trunk/jcl104-over-slf4j/pom.xml Wed Jul 4 21:52:45 2007
@@ -3,7 +3,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/osgi-over-slf4j/pom.xml
==============================================================================
--- slf4j/trunk/osgi-over-slf4j/pom.xml (original)
+++ slf4j/trunk/osgi-over-slf4j/pom.xml Wed Jul 4 21:52:45 2007
@@ -3,7 +3,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/pom.xml
==============================================================================
--- slf4j/trunk/pom.xml (original)
+++ slf4j/trunk/pom.xml Wed Jul 4 21:52:45 2007
@@ -5,7 +5,7 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
<packaging>pom</packaging>
<name>SLF4J</name>
Modified: slf4j/trunk/slf4j-api/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-api/pom.xml (original)
+++ slf4j/trunk/slf4j-api/pom.xml Wed Jul 4 21:52:45 2007
@@ -5,7 +5,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-api/src/main/java/org/slf4j/MDC.java
==============================================================================
--- slf4j/trunk/slf4j-api/src/main/java/org/slf4j/MDC.java (original)
+++ slf4j/trunk/slf4j-api/src/main/java/org/slf4j/MDC.java Wed Jul 4 21:52:45 2007
@@ -29,12 +29,29 @@
import org.slf4j.spi.MDCAdapter;
/**
- * MDC class serves as an abstraction of the underlying logging system's
- * MDC implementation. At this time, only log4j and logback offer MDC
- * functionality. For other systems, this SLF4J defaults to nop (empty)
- * implementation.
+ * This class hides and serves as a substitute for the underlying logging
+ * system's MDC implementation.
*
- * <p>Please note that all methods in this class are static.
+ * <p>
+ * If the underlying logging system offers MDC
+ * functionality, then SLF4J's MDC, i.e. this class, will delegate to
+ * the underlying system's MDC. Note that at this time, only two logging
+ * systems, namely log4j and logback, offer MDC functionality. If the
+ * undelying system does not support MDC, then SLF4J will silently
+ * drop MDC information.
+ *
+ * <p>
+ * Thus, as a SLF4J user, you can take advantage of MDC in
+ * the presence of log4j or logback, but without forcing
+ * log4j or logback as dependencies upon your users.
+ *
+ * <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.
+ *
+ * <p>
+ * Please note that all methods in this class are static.
*
* @author Ceki Gülcü
*/
Modified: slf4j/trunk/slf4j-archetype/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-archetype/pom.xml (original)
+++ slf4j/trunk/slf4j-archetype/pom.xml Wed Jul 4 21:52:45 2007
@@ -2,7 +2,7 @@
<parent>
<artifactId>slf4j-parent</artifactId>
<groupId>org.slf4j</groupId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-converter/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-converter/pom.xml (original)
+++ slf4j/trunk/slf4j-converter/pom.xml Wed Jul 4 21:52:45 2007
@@ -7,7 +7,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-jcl/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-jcl/pom.xml (original)
+++ slf4j/trunk/slf4j-jcl/pom.xml Wed Jul 4 21:52:45 2007
@@ -3,7 +3,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-jdk14/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-jdk14/pom.xml (original)
+++ slf4j/trunk/slf4j-jdk14/pom.xml Wed Jul 4 21:52:45 2007
@@ -6,7 +6,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-log4j12/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-log4j12/pom.xml (original)
+++ slf4j/trunk/slf4j-log4j12/pom.xml Wed Jul 4 21:52:45 2007
@@ -6,7 +6,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java
==============================================================================
--- slf4j/trunk/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java (original)
+++ slf4j/trunk/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java Wed Jul 4 21:52:45 2007
@@ -123,8 +123,13 @@
MDC.put("k", "v");
assertNotNull(MDC.get("k"));
assertEquals("v", MDC.get("k"));
+
MDC.remove("k");
assertNull(MDC.get("k"));
+
+ MDC.put("k1", "v1");
+ assertEquals("v1", MDC.get("k1"));
MDC.clear();
+ assertNull(MDC.get("k1"));
}
}
Modified: slf4j/trunk/slf4j-nop/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-nop/pom.xml (original)
+++ slf4j/trunk/slf4j-nop/pom.xml Wed Jul 4 21:52:45 2007
@@ -6,7 +6,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-osgi-integration-test/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-osgi-integration-test/pom.xml (original)
+++ slf4j/trunk/slf4j-osgi-integration-test/pom.xml Wed Jul 4 21:52:45 2007
@@ -6,7 +6,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-osgi-test-bundle/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-osgi-test-bundle/pom.xml (original)
+++ slf4j/trunk/slf4j-osgi-test-bundle/pom.xml Wed Jul 4 21:52:45 2007
@@ -6,7 +6,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-simple/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-simple/pom.xml (original)
+++ slf4j/trunk/slf4j-simple/pom.xml Wed Jul 4 21:52:45 2007
@@ -3,7 +3,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: slf4j/trunk/slf4j-site/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-site/pom.xml (original)
+++ slf4j/trunk/slf4j-site/pom.xml Wed Jul 4 21:52:45 2007
@@ -5,7 +5,7 @@
<parent>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
- <version>1.4.1-SNAPSHOT</version>
+ <version>1.4.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
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 Wed Jul 4 21:52:45 2007
@@ -116,9 +116,9 @@
<h2>Built-in support in logback</h2>
- <p>The <code>ch.qos.logback.classic.Logger</code> class in logback directly
- implements SLF4J's <code>org.slf4j.Logger</code> interface. Moreover,
- logback makes extensive use of SLF4J internally.
+ <p>The <code>ch.qos.logback.classic.Logger</code> class in
+ logback directly implements SLF4J's
+ <code>org.slf4j.Logger</code> interface.
</p>
<p>Logback's built-in (a.k.a. native) support for SLF4J means
@@ -131,9 +131,33 @@
computational overhead.
</p>
+ <a name="mdc">
+ </a>
- <a name="gradual"><h2>Gradual migration to SLF4J from Jakarta
- Commons Logging (JCL)</h2></a>
+ <h2>Mapped Diagnostic Context (MDC) support</h2>
+
+ <p>As of version 1.4.1, SLF4J supports MDC, or mapped
+ diagnosic context. If the underlying logging system offers MDC
+ functionality, then SLF4J will delegate to the underlying
+ system's MDC. Note that at this time, only log4j and logback
+ offer MDC functionality. If the undelying system does not
+ offer MDC, then SLF4J will silently drop MDC information.
+ </p>
+
+ <p>Thus, as a SLF4J user, you can take advantage of MDC
+ information in the presence of log4j or logback, but without
+ forcing these upon your users as dependencies.
+ </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.
+
+ <a name="gradual">
+ </a>
+
+ <h2>Gradual migration to SLF4J from Jakarta Commons Logging
+ (JCL)</h2>
<h2><em>jcl104-over-slf4j.jar</em></h2>
@@ -201,7 +225,7 @@
to JCL, resulting in an infinite loop.
</p>
- <a name="summary"><h2>Summary</h2></a>
+ <a name="summary"><h2>Executive summary</h2></a>
<table class="bodyTable" cellspacing="4" cellpadding="4">
<tr>
@@ -243,8 +267,9 @@
</td>
<td>SLF4J supports popular logging systems, namely log4j,
- JDK 1.4 logging, Simple logging and NOP whereas x4juli and
- logback logging systems support the SLF4J API natively.
+ JDK 1.4 logging, Simple logging and NOP whereas the <a
+ href="http://logback.qos.ch">logback</a> API 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 Wed Jul 4 21:52:45 2007
@@ -31,8 +31,16 @@
<hr noshade="noshade" size="1"/>
+
<h3>July 4th, 2007 - Release of SLF4J 1.4.1</h3>
+
+ <p>SLF4J now support <a href="manual.html#mdc">Mapped Diagnostic
+ Contexts</a> (MDC) as requested by Andy Gerweck and Steve Ebersole
+ in <a href="http://bugzilla.slf4j.org/show_bug.cgi?id=49">bug
+ 49</a>.
+ </p>
+
<p>Fixed <a href="http://bugzilla.slf4j.org/show_bug.cgi?id=53">bug
53</a> as reported by Heinrich Nirschl. The public method
<code>trace(String)</code> in the <code>Log4jLoggerAdapter</code>
More information about the slf4j-dev
mailing list