Skip to content

Commit 2852809

Browse files
committed
mentioned reload4j in the docs
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
1 parent 6abaf68 commit 2852809

File tree

6 files changed

+62
-15
lines changed

6 files changed

+62
-15
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</scm>
3434

3535
<properties>
36-
<latest.stable.version>1.7.32</latest.stable.version>
36+
<latest.stable.version>1.7.33</latest.stable.version>
3737
<!-- java.util.ServiceLoader requires Java 6 -->
3838
<jdk.version>8</jdk.version>
3939
<maven.compiler.source>${jdk.version}</maven.compiler.source>
@@ -46,7 +46,7 @@
4646
<cal10n.version>0.8.1</cal10n.version>
4747
<reload4j.version>1.2.18.0</reload4j.version>
4848
<log4j.version>1.2.17</log4j.version>
49-
<logback.version>1.2.3</logback.version>
49+
<logback.version>1.2.10</logback.version>
5050
<junit.version>4.13.1</junit.version>
5151
<maven-site-plugin.version>3.7.1</maven-site-plugin.version>
5252
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>

slf4j-site/src/site/pages/codes.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,10 @@ <h3 class="doAnchor" name="log4jDelegationLoop">Detected both
461461
<code>StackOverflowError</code>.
462462
</p>
463463

464+
<p>Note that since reload4j provides the log4j 1.x API,
465+
reload4j.jar and log4j-over-slf4j.jar cannot be present
466+
simultaneously on your classpath.</p>
467+
464468
<p>For more background on this topic see <a
465469
href="legacy.html">Bridging legacy APIs</a>.
466470
</p>

slf4j-site/src/site/pages/faq.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ <h2>Generalities</h2>
409409
slf4j-api and slf4j-simple versions are placed on the class
410410
path. Please note that the table below applies by analogy not
411411
just to slf4j-simple but also to other providers such as
412-
slf4j-log4j12, logback-classic, slf4j-jdk14, etc...
412+
slf4j-reload4j, logback-classic, slf4j-jdk14, etc...
413413
</p>
414414

415415

@@ -432,7 +432,7 @@ <h2>Generalities</h2>
432432
<td>1.7.x</td>
433433
<td>2.0.x</td>
434434
<td>no bindings can be found warning message</td>
435-
<td>2.0.x providers do <b>not</b> act as 1.7.x/16.x
435+
<td>2.0.x providers do <b>not</b> act as 1.7.x/1.6.x
436436
comptatible bindings</td>
437437
</tr>
438438

@@ -469,7 +469,7 @@ <h2>Generalities</h2>
469469

470470
<p>However, while the SLF4J API is very stable from the client's
471471
perspective, SLF4J providers, e.g. slf4j-simple.jar or
472-
slf4j-log4j12.jar, may require a specific version of slf4j-api.
472+
slf4j-reload4j.jar, may require a specific version of slf4j-api.
473473
Mixing different versions of slf4j artifacts can be problematic
474474
and is strongly discouraged. For instance, if you are using
475475
slf4j-api-2.0.0.jar, then you should also use
@@ -484,7 +484,7 @@ <h2>Generalities</h2>
484484

485485
<p><span class="label">Fluent API requires version 2.0</span> If
486486
your code accesses the fluent API introduced in slf4j 2.0, then
487-
your code will require version 2.0 or later.</p>
487+
your code will require slf4j-api version 2.0 or later.</p>
488488

489489

490490
</dd>

slf4j-site/src/site/pages/legacy.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,20 @@ <h4 class="doAnchor" name="log4jRecursion">log4j-over-slf4j.jar
206206
href="codes.html#log4jDelegationLoop">endless loop</a>.
207207
</p>
208208

209+
<h4 class="doAnchor" name="log4jRecursion2">log4j-over-slf4j.jar
210+
and slf4j-reload4j.jar cannot be present simultaneously
211+
</h4>
212+
213+
<p>The presence of <em>slf4j-reload4j.jar</em>, that is the
214+
reload4j binding for SLF4J, will force all SLF4J calls to be
215+
delegated to reload4j which has the same exact API as log4j
216+
1.x. The presence of <em>log4j-over-slf4j.jar</em> will in turn
217+
delegate all reload4j API calls to their SLF4J equivalents. If
218+
both are present simultaneously, SLF4J calls will be delegated to
219+
reload4j (which contains the log4j 1.x API), and log4j calls
220+
redirected to SLF4j, resulting in
221+
an <a href="codes.html#log4jDelegationLoop">endless loop</a>.
222+
</p>
209223

210224

211225
<h2 class="doAnchor" name="jul-to-slf4j">jul-to-slf4j bridge</h2>

slf4j-site/src/site/pages/manual.html

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,22 +269,37 @@ <h3 class="doAnchor" name="swapping">Binding with a logging
269269

270270
<dt><em>slf4j-log4j12-${latest.stable.version}.jar</em>
271271
</dt>
272-
<dd>Binding for <a
272+
<dd>Binding/provider for <a
273273
href="http://logging.apache.org/log4j/1.2/index.html">log4j
274274
version 1.2</a>, a widely used logging framework. You also
275-
need to place <em>log4j.jar</em> on your class path.<p/></dd>
275+
need to place <em>log4j.jar</em> on your class path. <span
276+
class="red">Given that the log4j 1.x has reached EOL
277+
status, we strongly encourage you to use
278+
<em>slf4j-reload4j</em> instead.</span>
279+
<p/>
276280

281+
</dd>
282+
283+
<dt><em>slf4j-reload4j-${latest.stable.version}.jar</em>
284+
</dt>
285+
<dd><span class="label notice">since 1.7.33</span> Binding/provider for
286+
<a href="http://reload4j.qos.ch">reload4j</a>
287+
framework. Reload4j is a drop-in replacement for log4j version
288+
1.2.7. You also need to place <em>reload4j.jar</em> on your
289+
class path.<p/></dd>
290+
291+
277292
<dt><em>slf4j-jdk14-${latest.stable.version}.jar</em> </dt>
278-
<dd>Binding for java.util.logging, also referred to as JDK 1.4
293+
<dd>Binding/provider for java.util.logging, also referred to as JDK 1.4
279294
logging <p/></dd>
280295

281296
<dt><em>slf4j-nop-${latest.stable.version}.jar</em></dt>
282-
<dd>Binding for <a
297+
<dd>Binding/provider for <a
283298
href="http://www.slf4j.org/api/org/slf4j/helpers/NOPLogger.html">NOP</a>,
284299
silently discarding all logging.<p/></dd>
285300

286301
<dt><em>slf4j-simple-${latest.stable.version}.jar</em></dt>
287-
<dd>Binding for <a
302+
<dd>Binding/provider for <a
288303
href="http://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html">Simple
289304
</a> implementation, which outputs all events to
290305
System.err. Only messages of level INFO and higher are
@@ -293,7 +308,7 @@ <h3 class="doAnchor" name="swapping">Binding with a logging
293308

294309
<dt><em>slf4j-jcl-${latest.stable.version}.jar</em></dt>
295310

296-
<dd>Binding for <a
311+
<dd>Binding/provider for <a
297312
href="http://commons.apache.org/logging/">Jakarta Commons
298313
Logging</a>. This binding will delegate all SLF4J logging to
299314
JCL.<p/>
@@ -302,7 +317,7 @@ <h3 class="doAnchor" name="swapping">Binding with a logging
302317
<dt><em>logback-classic-${logback.version}.jar (requires logback-core-${logback.version}.jar)</em></dt>
303318

304319
<dd><span class="label notice">Native implementation</span> There are also
305-
SLF4J bindings external to the SLF4J project, e.g. <a
320+
SLF4J bindings/providers external to the SLF4J project, e.g. <a
306321
href="http://logback.qos.ch/">logback</a> which implements
307322
SLF4J natively. Logback's
308323
<a href="http://logback.qos.ch/apidocs/ch/qos/logback/classic/Logger.html">
@@ -334,8 +349,20 @@ <h3 class="doAnchor" name="swapping">Binding with a logging
334349
to <em>slf4j-api-${latest.stable.version}.jar</em>, you simply drop
335350
<b>one and only one</b> binding of your choice onto the
336351
appropriate class path location. Do not place more than one
337-
binding on your class path. Here is a graphical illustration of
338-
the general idea.
352+
binding on your class path.</p>
353+
354+
355+
<p><span class="label">since 2.0.0</span> As of version 2.0.0,
356+
SLF4J bindings are called providers. Nevertheless, the general
357+
idea remains the same. SLF4J API version 2.0.0 relies on the <a
358+
href="https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html">ServiceLoader</a>
359+
mechanism to find its logging backend. See the relevant <a
360+
href="faq.html#changesInVersion200">FAQ entry</a> for more
361+
details.
362+
</p>
363+
364+
365+
<p>Here is a graphical illustration of the general idea.
339366
</p>
340367

341368
<p><a href="images/concrete-bindings.png">

slf4j-site/src/site/pages/news.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ <h1>SLF4J News</h1>
4040
class names in <code/>
4141
-->
4242

43+
<h3>2022-01-13 - Release of SLF4J 2.0.0-alpha6</h3>
44+
4345
<hr noshade="noshade" size="1"/>
4446

4547
<h3>30th of August, 2021 - Release of SLF4J 2.0.0-alpha5</h3>

0 commit comments

Comments
 (0)