The branch, master has been updated via 3178c3cdb499641ace0e3f286a1e9a1b3a25f798 (commit) from d0bd0734e5b9dd7180a24337c430bf9a73624aa3 (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=3178c3cdb499641ace0e3f286a1e9a1b3a25f798 http://github.com/ceki/slf4j/commit/3178c3cdb499641ace0e3f286a1e9a1b3a25f798 commit 3178c3cdb499641ace0e3f286a1e9a1b3a25f798 Author: Ceki Gulcu <c...@qos.ch> Date: Thu Oct 1 14:26:17 2009 +0200 - jxr plugin now correctly links to the javadocs - added faq entry about using ILoggerFactory instead of LoggerFactory diff --git a/pom.xml b/pom.xml index 048c18a..aab9c49 100644 --- a/pom.xml +++ b/pom.xml @@ -279,17 +279,9 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> - <reportSets> - <reportSet> - <reports> - <report>jxr</report> - <report>test-jxr</report> - </reports> - </reportSet> - </reportSets> <configuration> <aggregate>true</aggregate> - <javadocDir>target/site/api/</javadocDir> + <javadocDir>target/site/apidocs/</javadocDir> <linkJavadoc>true</linkJavadoc> </configuration> </plugin> diff --git a/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java b/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java index c0056ac..6397ae0 100644 --- a/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java +++ b/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java @@ -231,7 +231,6 @@ public final class LoggerFactory { GET_SINGLETON_METHOD = GET_SINGLETON_INEXISTENT; return StaticLoggerBinder.SINGLETON; } - } /** diff --git a/slf4j-site/src/site/pages/faq.html b/slf4j-site/src/site/pages/faq.html index 586acf4..55cf6da 100644 --- a/slf4j-site/src/site/pages/faq.html +++ b/slf4j-site/src/site/pages/faq.html @@ -124,6 +124,12 @@ <li><a href="#i18n">Does the SLF4J logging API support I18N (internationalization)? </a></li> + + + <li><a href="#noLoggerFactory">Is it possible to retrieve loggers + without going through the static methods in + <code>LoggerFactory</code>? </a></li> + </ol> @@ -941,9 +947,46 @@ logger.debug("The new entry is {}.", entry);</pre> support as a thin layer built upon the <a href="http://cal10n.qos.ch">CAL10N API</a>.</p> + <hr/> </dd> + + <dt><a name="noLoggerFactory" href="#noLoggerFactory">Is it + possible to retrieve loggers without going through the static + methods in <code>LoggerFactory</code>?</a> + </dt> + + <dd> + + <p>Yes. <code>LoggerFactory</code> is essentially a wrapper + around an <a + href="xref/org/slf4j/ILoggerFactory.html"><code>ILoggerFactory</code></a> + instance. The <code>ILoggerFactory</code> instance in use is + determined according to the static binding conventions of the + SLF4J framework. See the <a + href="xref/org/slf4j/LoggerFactory.html#217">getSingleton()</a> + method in <code>LoggerFactory</code> for details. + </p> + + <p>However, nothing prevents you from using your own + <code>ILoggerFactory</code> instance. Note that you can also + obtain a reference to the <code>ILoggerFactory</code> that the + <code>LoggerFactory</code> class is using by invoking the <a + href="apidocs/org/slf4j/LoggerFactory.html#getILoggerFactory()"> + <code>LoggerFactory.getILoggerFactory()</code></a> method. + </p> + + <p>Thus, if SLF4J binding conventions do not fit your needs, or + if you need additional flexibility, then do consider using the + <code>ILoggerFactory</code> interface as an alternative to + inventing your own logging API.</p> + </dd> + + </dl> + + + <h2>Implementing the SLF4J API</h2> ----------------------------------------------------------------------- Summary of changes: pom.xml | 10 +---- .../src/main/java/org/slf4j/LoggerFactory.java | 1 - slf4j-site/src/site/pages/faq.html | 43 ++++++++++++++++++++ 3 files changed, 44 insertions(+), 10 deletions(-) hooks/post-receive -- SLF4J: Simple Logging Facade for Java _______________________________________________ dev mailing list dev@slf4j.org http://www.slf4j.org/mailman/listinfo/dev