[slf4j-dev] svn commit: r757 - slf4j/trunk/slf4j-site/src/site/resources

ceki at slf4j.org ceki at slf4j.org
Sat Feb 24 16:28:38 CET 2007


Author: ceki
Date: Sat Feb 24 16:28:38 2007
New Revision: 757

Modified:
   slf4j/trunk/slf4j-site/src/site/resources/faq.html

Log:

Added a Maven2 related FAQ entry



Modified: slf4j/trunk/slf4j-site/src/site/resources/faq.html
==============================================================================
--- slf4j/trunk/slf4j-site/src/site/resources/faq.html	(original)
+++ slf4j/trunk/slf4j-site/src/site/resources/faq.html	Sat Feb 24 16:28:38 2007
@@ -37,16 +37,21 @@
       recompile my application to switch to a different logging
       system?  </a></li>
 
-      <li><a href="#license"> Why is SLF4J licensed under X11 type
+      <li><a href="#license">Why is SLF4J licensed under X11 type
       license instead of the Apache Software License?  </a></li>
 
-      <li><a href="#where_is_binding"> Where can I get a particular
+      <li><a href="#where_is_binding">Where can I get a particular
       SLF4J binding?  </a></li>
 
-      <li><a href="#configure_logging"> Should my library attempt to
+      <li><a href="#configure_logging">Should my library attempt to
       configure logging?
       </a>
       </li>
+
+      <li><a href="#maven2">What about Maven 2 transitive
+      dependencies?
+      </a>
+      </li>
     </ol>
 
 
@@ -279,7 +284,8 @@
         logback-classic binding requires <em>slf4j-api.jar</em>.
        </p>
 
-      <table border="0"><tr><td align="right"><a href="#top">[top]</a></td></tr></table><hr /></dd>
+      <table border="0"><tr><td align="right"><a href="#top">[top]</a></td></tr></table><hr />
+      </dd>
 
       <dt><a name="configure_logging"> Should my library attempt to
       configure logging?  </a>
@@ -299,8 +305,47 @@
        <table border="0"><tr><td align="right"><a href="#top">[top]</a></td></tr>
        </table>
        </dd>
-       </dl>
-       </div>
+       
+       <dt><a name="maven2">What about Maven 2 transitive
+       dependencies? </a>
+       </dt>
+       
+       <dd>
+         <p>As a library author built with Maven2, you might want to
+         test your application using a binding, say slf4j-simple or
+         slf4j-log4j12, without exporting that dependency to your
+         users. But first, since your library's code depends on the
+         SLF4J API you will need to declare slf4j-api as a
+         compile-time (default scope) dependency.
+       </p>
+       <p>&nbsp;</p>         
+       <p class="source">&lt;dependency&gt;
+  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
+  &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
+  &lt;version&gt;1.3&lt;/version&gt;
+&lt;/dependency&gt;</p>
+
+       <p>&nbsp;</p>         
+
+       <p>Limiting the transitivity of the binding you are using for
+       your test is as easy as declaring the scope of the dependency
+       as "test".  Here is an example:</p>
+
+       <p>&nbsp;</p>         
+
+       <p class="source">&lt;dependency&gt;
+  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
+  &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
+  &lt;version&gt;1.3&lt;/version&gt;
+  <b>&lt;scope&gt;test&lt;/scope&gt;</b>
+&lt;/dependency&gt;</p>
+
+     
+
+       </dd>
+
+     </dl>
+    </div>
 
        <div class="section">
 
@@ -574,11 +619,23 @@
         DEBUG, <a href="api/org/slf4j/Marker.html">Marker</a> objects
         can be put to use to convey the desired new meaning. 
        </p>
-      <table border="0"><tr><td align="right"><a href="#top">[top]</a></td></tr></table></dd></dl></div><div class="section"><h2>Implementing the SLF4J API</h2><dl><dt><a name="slf4j_compatible">
-      How do I make my logging framework SLF4J
-      compatible?
-      </a></dt><dd>
+      
+       <table border="0"><tr><td align="right"><a href="#top">[top]</a></td></tr></table>
+
+       </dd>
+       </dl>
+     </div>
 
+
+      <div class="section">
+
+        <h2>Implementing the SLF4J API</h2><dl><dt><a name="slf4j_compatible">
+        How do I make my logging framework SLF4J
+        compatible?
+        </a>
+        </dt>
+        <dd>
+        
         <p>Adding supporting for the SLF4J is suprisingly
         easy. Essentialy, you coping an existing binding and tailoring
         it a little (as explained below) does the trick.



More information about the slf4j-dev mailing list