[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch master updated. v_1.6.6-13-g0b68150

Gitbot git-noreply at pixie.qos.ch
Thu Aug 23 19:20:45 CEST 2012


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  0b68150048e745409d0f19463c36c443f7eaf4ae (commit)
      from  d74da4635bf1bb026c181e816482f8f81825c734 (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=0b68150048e745409d0f19463c36c443f7eaf4ae
http://github.com/ceki/slf4j/commit/0b68150048e745409d0f19463c36c443f7eaf4ae

commit 0b68150048e745409d0f19463c36c443f7eaf4ae
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Thu Aug 23 19:20:23 2012 +0200

    docs updates

diff --git a/slf4j-site/src/site/pages/codes.html b/slf4j-site/src/site/pages/codes.html
index 6ec99ec..e01c22f 100644
--- a/slf4j-site/src/site/pages/codes.html
+++ b/slf4j-site/src/site/pages/codes.html
@@ -159,16 +159,59 @@
     <em>slf4j-simple-${version}.jar</em> and
     <em>slf4j-nop-${version}.jar</em> on the class path and you wish
     to use the nop (no-operation) binding, then remove
-    <em>slf4j-simple-${version}.jar</em> from the class path. If it is
-    not possible to remove the superflous bindings, SLF4J will still
-    bind with one logging framework/implementation. As of version
-    1.6.6, SLF4J will name the framework/implementation class it is
-    actually bound to.</p>
-
-    <p><span class="label notice">Note</span> The warning emitted by
-    SLF4J is just that, a warning.
+    <em>slf4j-simple-${version}.jar</em> from the class path. 
     </p>
 
+    <p>The list of locations that SLF4J provides in this warning
+    usually provides sufficient information to identify the dependency
+    transitively pulling in an unwanted SLF4J binding into your
+    project. In your project's pom.xml file, exclude this SLF4J
+    binding when declaring the unscrupulous dependency. For example,
+    <em>cassandra-all</em> version 0.8.1 declares both <em>log4j</em>
+    and <em>slf4j-log4j12</em> as compile-time dependencies. Thus,
+    when you include <em>cassandra-all</em> a dependnecy in your
+    project, it will pulling in both <em>slf4j-log4j12.jar</em> and
+    <em>log4j.jar</em> as dependencies. In case you do not wish to use
+    log4j as the the SLF4J backend, you can instruct Maven to exclude
+    these two artifacts as shown next:</p>
+
+    <pre class="prettyprint"><dependencies>
+  <dependency>
+    <groupId> org.apache.cassandra</groupId>
+    <artifactId>cassandra-all</artifactId>
+    <version>0.8.1</version>
+
+    <exclusions>
+      <exclusion> 
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-log4j12</artifactId>
+      </exclusion>
+      <exclusion> 
+        <groupId>log4j</groupId>
+        <artifactId>log4j</artifactId>
+      </exclusion>
+    </exclusions> 
+
+  </dependency>
+</dependencies></pre>
+
+   <p><span class="label notice">Note</span> The warning emitted by
+   SLF4J is just that, a warning. Even when multiple bindings are
+   present, SLF4J will pick one logging framework/implementation and
+   bind with it. The way SLF4J picks a binding is determined by the
+   JVM and for all practical purposes should be considered random. As
+   of version 1.6.6, SLF4J will name the framework/implementation
+   class it is actually bound to.</p>
+
+   <p>Embedded components such as libraries or frameworks should not
+   declare a dependency on any SLF4J binding but only depend on
+   slf4j-api. When a library declares a compile-time dependency on a
+   SLF4J binding, it imposes that binding on the end-user, thus
+   negating SLF4J's purpose. When you come across an embedded
+   component declaring a compile-time dependency on any SLF4J binding,
+   please take the time to contact the authors of said
+   component/library and kindly ask them to mend their ways.</p>
+  
     <!-- ====================================================== -->
 
     <h3 class="doAnchor" name="version_mismatch">slf4j-api version
diff --git a/slf4j-site/src/site/pages/faq.html b/slf4j-site/src/site/pages/faq.html
index b9a07b1..e80021a 100644
--- a/slf4j-site/src/site/pages/faq.html
+++ b/slf4j-site/src/site/pages/faq.html
@@ -657,7 +657,7 @@ org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
       jcl-over-slf4j, you would need to exclude commons-logging in all
       of your project's dependencies which transitively depend on
       commons-logging. <a
-      href="http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.htm">Dependency
+      href="http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html">Dependency
       exclusion</a> is described in the Maven documentation. Excluding
       commons-logging explicitly for multiple dependencies distributed
       on several <em>pom.xml</em> files can be a cumbersome and a
diff --git a/slf4j-site/src/site/pages/manual.html b/slf4j-site/src/site/pages/manual.html
index 940a825..ce4b5b6 100644
--- a/slf4j-site/src/site/pages/manual.html
+++ b/slf4j-site/src/site/pages/manual.html
@@ -248,9 +248,9 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
       dependencies for logging</h3>
 
       <p><b>Please note that embedded components such as libraries or
-      frameworks should not declare a dependency on any slf4j binding
-      but only on slf4j-api.</b> SLF4J usage in embedded components is
-      also discussed in the FAQ in relation with <a
+      frameworks should not declare a dependency on any SLF4J binding
+      but only depend on slf4j-api.</b> SLF4J usage in embedded
+      components is also discussed in the FAQ in relation with <a
       href="faq.html#configure_logging">logging configuration</a>, <a
       href="faq.html#optional_dependency">dependency reduction</a> and
       <a href="faq.html#optional_dependency">testing</a>.</p>

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

Summary of changes:
 slf4j-site/src/site/pages/codes.html  |   59 ++++++++++++++++++++++++++++----
 slf4j-site/src/site/pages/faq.html    |    2 +-
 slf4j-site/src/site/pages/manual.html |    6 ++--
 3 files changed, 55 insertions(+), 12 deletions(-)


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


More information about the slf4j-dev mailing list