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> </p> + <p class="source"><dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.3</version> +</dependency></p> + + <p> </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> </p> + + <p class="source"><dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.3</version> + <b><scope>test</scope></b> +</dependency></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. _______________________________________________ dev mailing list dev@slf4j.org http://www.slf4j.org/mailman/listinfo/dev