mirror of https://github.com/qos-ch/slf4j
mentioned reload4j in the docs
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
This commit is contained in:
parent
6abaf6897b
commit
28528094b9
4
pom.xml
4
pom.xml
|
|
@ -33,7 +33,7 @@
|
|||
</scm>
|
||||
|
||||
<properties>
|
||||
<latest.stable.version>1.7.32</latest.stable.version>
|
||||
<latest.stable.version>1.7.33</latest.stable.version>
|
||||
<!-- java.util.ServiceLoader requires Java 6 -->
|
||||
<jdk.version>8</jdk.version>
|
||||
<maven.compiler.source>${jdk.version}</maven.compiler.source>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<cal10n.version>0.8.1</cal10n.version>
|
||||
<reload4j.version>1.2.18.0</reload4j.version>
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<logback.version>1.2.3</logback.version>
|
||||
<logback.version>1.2.10</logback.version>
|
||||
<junit.version>4.13.1</junit.version>
|
||||
<maven-site-plugin.version>3.7.1</maven-site-plugin.version>
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
|
|
|
|||
|
|
@ -461,6 +461,10 @@ class B extends A {
|
|||
<code>StackOverflowError</code>.
|
||||
</p>
|
||||
|
||||
<p>Note that since reload4j provides the log4j 1.x API,
|
||||
reload4j.jar and log4j-over-slf4j.jar cannot be present
|
||||
simultaneously on your classpath.</p>
|
||||
|
||||
<p>For more background on this topic see <a
|
||||
href="legacy.html">Bridging legacy APIs</a>.
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@
|
|||
slf4j-api and slf4j-simple versions are placed on the class
|
||||
path. Please note that the table below applies by analogy not
|
||||
just to slf4j-simple but also to other providers such as
|
||||
slf4j-log4j12, logback-classic, slf4j-jdk14, etc...
|
||||
slf4j-reload4j, logback-classic, slf4j-jdk14, etc...
|
||||
</p>
|
||||
|
||||
|
||||
|
|
@ -432,7 +432,7 @@
|
|||
<td>1.7.x</td>
|
||||
<td>2.0.x</td>
|
||||
<td>no bindings can be found warning message</td>
|
||||
<td>2.0.x providers do <b>not</b> act as 1.7.x/16.x
|
||||
<td>2.0.x providers do <b>not</b> act as 1.7.x/1.6.x
|
||||
comptatible bindings</td>
|
||||
</tr>
|
||||
|
||||
|
|
@ -469,7 +469,7 @@
|
|||
|
||||
<p>However, while the SLF4J API is very stable from the client's
|
||||
perspective, SLF4J providers, e.g. slf4j-simple.jar or
|
||||
slf4j-log4j12.jar, may require a specific version of slf4j-api.
|
||||
slf4j-reload4j.jar, may require a specific version of slf4j-api.
|
||||
Mixing different versions of slf4j artifacts can be problematic
|
||||
and is strongly discouraged. For instance, if you are using
|
||||
slf4j-api-2.0.0.jar, then you should also use
|
||||
|
|
@ -484,7 +484,7 @@
|
|||
|
||||
<p><span class="label">Fluent API requires version 2.0</span> If
|
||||
your code accesses the fluent API introduced in slf4j 2.0, then
|
||||
your code will require version 2.0 or later.</p>
|
||||
your code will require slf4j-api version 2.0 or later.</p>
|
||||
|
||||
|
||||
</dd>
|
||||
|
|
|
|||
|
|
@ -206,6 +206,20 @@
|
|||
href="codes.html#log4jDelegationLoop">endless loop</a>.
|
||||
</p>
|
||||
|
||||
<h4 class="doAnchor" name="log4jRecursion2">log4j-over-slf4j.jar
|
||||
and slf4j-reload4j.jar cannot be present simultaneously
|
||||
</h4>
|
||||
|
||||
<p>The presence of <em>slf4j-reload4j.jar</em>, that is the
|
||||
reload4j binding for SLF4J, will force all SLF4J calls to be
|
||||
delegated to reload4j which has the same exact API as log4j
|
||||
1.x. The presence of <em>log4j-over-slf4j.jar</em> will in turn
|
||||
delegate all reload4j API calls to their SLF4J equivalents. If
|
||||
both are present simultaneously, SLF4J calls will be delegated to
|
||||
reload4j (which contains the log4j 1.x API), and log4j calls
|
||||
redirected to SLF4j, resulting in
|
||||
an <a href="codes.html#log4jDelegationLoop">endless loop</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<h2 class="doAnchor" name="jul-to-slf4j">jul-to-slf4j bridge</h2>
|
||||
|
|
|
|||
|
|
@ -269,22 +269,37 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
|
|||
|
||||
<dt><em>slf4j-log4j12-${latest.stable.version}.jar</em>
|
||||
</dt>
|
||||
<dd>Binding for <a
|
||||
<dd>Binding/provider for <a
|
||||
href="http://logging.apache.org/log4j/1.2/index.html">log4j
|
||||
version 1.2</a>, a widely used logging framework. You also
|
||||
need to place <em>log4j.jar</em> on your class path.<p/></dd>
|
||||
need to place <em>log4j.jar</em> on your class path. <span
|
||||
class="red">Given that the log4j 1.x has reached EOL
|
||||
status, we strongly encourage you to use
|
||||
<em>slf4j-reload4j</em> instead.</span>
|
||||
<p/>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt><em>slf4j-reload4j-${latest.stable.version}.jar</em>
|
||||
</dt>
|
||||
<dd><span class="label notice">since 1.7.33</span> Binding/provider for
|
||||
<a href="http://reload4j.qos.ch">reload4j</a>
|
||||
framework. Reload4j is a drop-in replacement for log4j version
|
||||
1.2.7. You also need to place <em>reload4j.jar</em> on your
|
||||
class path.<p/></dd>
|
||||
|
||||
|
||||
<dt><em>slf4j-jdk14-${latest.stable.version}.jar</em> </dt>
|
||||
<dd>Binding for java.util.logging, also referred to as JDK 1.4
|
||||
<dd>Binding/provider for java.util.logging, also referred to as JDK 1.4
|
||||
logging <p/></dd>
|
||||
|
||||
<dt><em>slf4j-nop-${latest.stable.version}.jar</em></dt>
|
||||
<dd>Binding for <a
|
||||
<dd>Binding/provider for <a
|
||||
href="http://www.slf4j.org/api/org/slf4j/helpers/NOPLogger.html">NOP</a>,
|
||||
silently discarding all logging.<p/></dd>
|
||||
|
||||
<dt><em>slf4j-simple-${latest.stable.version}.jar</em></dt>
|
||||
<dd>Binding for <a
|
||||
<dd>Binding/provider for <a
|
||||
href="http://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html">Simple
|
||||
</a> implementation, which outputs all events to
|
||||
System.err. Only messages of level INFO and higher are
|
||||
|
|
@ -293,7 +308,7 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
|
|||
|
||||
<dt><em>slf4j-jcl-${latest.stable.version}.jar</em></dt>
|
||||
|
||||
<dd>Binding for <a
|
||||
<dd>Binding/provider for <a
|
||||
href="http://commons.apache.org/logging/">Jakarta Commons
|
||||
Logging</a>. This binding will delegate all SLF4J logging to
|
||||
JCL.<p/>
|
||||
|
|
@ -302,7 +317,7 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
|
|||
<dt><em>logback-classic-${logback.version}.jar (requires logback-core-${logback.version}.jar)</em></dt>
|
||||
|
||||
<dd><span class="label notice">Native implementation</span> There are also
|
||||
SLF4J bindings external to the SLF4J project, e.g. <a
|
||||
SLF4J bindings/providers external to the SLF4J project, e.g. <a
|
||||
href="http://logback.qos.ch/">logback</a> which implements
|
||||
SLF4J natively. Logback's
|
||||
<a href="http://logback.qos.ch/apidocs/ch/qos/logback/classic/Logger.html">
|
||||
|
|
@ -334,8 +349,20 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
|
|||
to <em>slf4j-api-${latest.stable.version}.jar</em>, you simply drop
|
||||
<b>one and only one</b> binding of your choice onto the
|
||||
appropriate class path location. Do not place more than one
|
||||
binding on your class path. Here is a graphical illustration of
|
||||
the general idea.
|
||||
binding on your class path.</p>
|
||||
|
||||
|
||||
<p><span class="label">since 2.0.0</span> As of version 2.0.0,
|
||||
SLF4J bindings are called providers. Nevertheless, the general
|
||||
idea remains the same. SLF4J API version 2.0.0 relies on the <a
|
||||
href="https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html">ServiceLoader</a>
|
||||
mechanism to find its logging backend. See the relevant <a
|
||||
href="faq.html#changesInVersion200">FAQ entry</a> for more
|
||||
details.
|
||||
</p>
|
||||
|
||||
|
||||
<p>Here is a graphical illustration of the general idea.
|
||||
</p>
|
||||
|
||||
<p><a href="images/concrete-bindings.png">
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@
|
|||
class names in <code/>
|
||||
-->
|
||||
|
||||
<h3>2022-01-13 - Release of SLF4J 2.0.0-alpha6</h3>
|
||||
|
||||
<hr noshade="noshade" size="1"/>
|
||||
|
||||
<h3>30th of August, 2021 - Release of SLF4J 2.0.0-alpha5</h3>
|
||||
|
|
|
|||
Loading…
Reference in New Issue