Skip to content

Commit 81a0568

Browse files
committed
update docs
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent f04cf16 commit 81a0568

File tree

8 files changed

+79
-54
lines changed

8 files changed

+79
-54
lines changed
Binary file not shown.
-1.46 KB
Binary file not shown.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,14 @@ <h3 class="doAnchor" name="null_LF">Logging factory implementation
420420
<!-- ====================================================== -->
421421

422422
<h3 class="doAnchor" name="log4jDelegationLoop">Detected both
423-
log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path,
423+
log4j-over-slf4j.jar AND slf4j-reload4j on the class path,
424424
preempting <code>StackOverflowError</code>.
425425
</h3>
426426

427-
<p>The purpose of slf4j-log4j12 module is to delegate or redirect
428-
calls made to an SLF4J logger to log4j. The purpose of the
429-
log4j-over-slf4j module is to redirect calls made to a log4j
430-
logger to SLF4J. If SLF4J is bound with<em>slf4j-log4j12.jar</em>
427+
<p>The purpose of slf4j-reload4j module is to delegate or redirect
428+
calls made to an SLF4J logger to log4j/reload4j. The purpose of
429+
the log4j-over-slf4j module is to redirect calls made to a log4j
430+
logger to SLF4J. If SLF4J is bound with<em>slf4j-reload4j.jar</em>
431431
and <em>log4j-over-slf4j.jar</em> is also present on the class
432432
path, a <code>StackOverflowError</code> will inevitably occur
433433
immediately after the first invocation of an SLF4J or a log4j

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ <h4 class="doAnchor" name="losOverhead">What about the
192192
made by using logback should compensate for the overhead of using
193193
log4j-over-slf4j instead of log4j directly.
194194
</p>
195-
195+
196+
<!--
196197
<h4 class="doAnchor" name="log4jRecursion">log4j-over-slf4j.jar
197198
and slf4j-log4j12.jar cannot be present simultaneously
198199
</h4>
@@ -205,7 +206,8 @@ <h4 class="doAnchor" name="log4jRecursion">log4j-over-slf4j.jar
205206
log4j, and log4j calls redirected to SLF4j, resulting in an <a
206207
href="codes.html#log4jDelegationLoop">endless loop</a>.
207208
</p>
208-
209+
-->
210+
209211
<h4 class="doAnchor" name="log4jRecursion2">log4j-over-slf4j.jar
210212
and slf4j-reload4j.jar cannot be present simultaneously
211213
</h4>

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

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ <h2>SLF4J user manual</h2>
3131

3232
<p>The Simple Logging Facade for Java (SLF4J) serves as a simple
3333
facade or abstraction for various logging frameworks, such as
34-
java.util.logging, logback and log4j. SLF4J allows the end-user to
35-
plug in the desired logging framework at <em>deployment</em> time.
36-
Note that SLF4J-enabling your library/application implies the
37-
addition of only a single mandatory dependency, namely
34+
java.util.logging, logback and reload4j. SLF4J allows the end-user
35+
to plug in the desired logging framework at <em>deployment</em>
36+
time. Note that SLF4J-enabling your library/application implies
37+
the addition of only a single mandatory dependency, namely
3838
<em>slf4j-api-${project.version}.jar</em>.</p>
3939

4040
<p><span class="label">since 1.6.0</span> If no binding is found on the
@@ -271,12 +271,14 @@ <h3 class="doAnchor" name="swapping">Binding with a logging
271271
</dt>
272272
<dd>Binding/provider for <a
273273
href="http://logging.apache.org/log4j/1.2/index.html">log4j
274-
version 1.2</a>, a widely used logging framework. You also
275-
need to place <em>log4j.jar</em> on your class path. <span
276-
class="red">Assuming you wish to continue to use the log4j 1.x
277-
framework, given that the log4j 1.x has reached EOL status, we
278-
strongly encourage you to use <em>slf4j-reload4j</em>
279-
instead.</span> See below.
274+
version 1.2</a>, a widely used logging framework. <span
275+
class="red">Given that log4j 1.x has been declared EOL in 2015
276+
and again in 2022, as of SLF4J 1.7.35, the <em>slf4j-log4j
277+
module</em> automatically redirects to the
278+
<em>slf4j-reload4j</em> module at <b>build time</b>.</span>
279+
Assuming you wish to continue to use the log4j 1.x framework,
280+
we strongly encourage you to use <code>slf4j-reload4j</code>
281+
instead. See below.
280282
<p/>
281283

282284
</dd>
@@ -445,13 +447,14 @@ <h3 class="doAnchor" name="projectDep">Declaring project
445447
you need to do is to declare "ch.qos.logback:logback-classic" as
446448
a dependency in your <em>pom.xml</em> file as shown below. In
447449
addition to <em>logback-classic-${logback.version}.jar</em>,
448-
this will pull <em>slf4j-api-${latest.stable.version}.jar</em> as well
449-
as <em>logback-core-${logback.version}.jar</em> into your
450+
this will pull in
451+
<em>slf4j-api-${latest.stable.version}.jar</em> as well as
452+
<em>logback-core-${logback.version}.jar</em> into your
450453
project. Note that explicitly declaring a dependency on
451454
<em>logback-core-${logback.version}</em> or
452-
<em>slf4j-api-${latest.stable.version}.jar</em> is not wrong and may
453-
be necessary to impose the correct version of said artifacts by
454-
virtue of Maven's "nearest definition" dependency mediation
455+
<em>slf4j-api-${latest.stable.version}.jar</em> is not wrong and
456+
may be necessary to impose the correct version of said artifacts
457+
by virtue of Maven's "nearest definition" dependency mediation
455458
rule.
456459
</p>
457460

@@ -465,19 +468,18 @@ <h3 class="doAnchor" name="projectDep">Declaring project
465468

466469
<!-- ================================== -->
467470
<p><span class="label notice">reload4j</span> If you wish to use
468-
reload4j as the underlying logging framework, all you need to do is
469-
to declare "org.slf4j:slf4j-reload4j" as a dependency in your
470-
<em>pom.xml</em> file as shown below. In addition to
471-
<em>slf4j-reload4j-${latest.stable.version}.jar</em>, this will pull
472-
<em>slf4j-api-${latest.stable.version}.jar</em> as well as
473-
<em>reload4j-${reload4j.version}.jar</em> into your project. Note
474-
that explicitly declaring a dependency on
475-
<em>reload4j-${reload4j.version}.jar</em> or
476-
<em>slf4j-api-${latest.stable.version}.jar</em> is not wrong and may
477-
be necessary to impose the correct version of said artifacts by
478-
virtue of Maven's "nearest definition" dependency mediation
479-
rule.</p>
480-
471+
reload4j as the underlying logging framework, all you need to do
472+
is to declare "org.slf4j:slf4j-reload4j" as a dependency in your
473+
<em>pom.xml</em> file as shown below. In addition to
474+
<em>slf4j-reload4j-${latest.stable.version}.jar</em>, this will
475+
pull in <em>slf4j-api-${latest.stable.version}.jar</em> as well
476+
as <em>reload4j-${reload4j.version}.jar</em> into your project.
477+
Note that explicitly declaring a dependency on
478+
<em>reload4j-${reload4j.version}.jar</em> or
479+
<em>slf4j-api-${latest.stable.version}.jar</em> is not wrong and
480+
may be necessary to impose the correct version of said artifacts
481+
by virtue of Maven's "nearest definition" dependency mediation
482+
rule.</p>
481483

482484
<pre class="prettyprint source">&lt;dependency>
483485
&lt;groupId>org.slf4j&lt;/groupId>
@@ -488,19 +490,10 @@ <h3 class="doAnchor" name="projectDep">Declaring project
488490

489491
<!-- ================================== -->
490492

491-
<p><span class="label notice">log4j</span> If you wish to use
492-
log4j as the underlying logging framework, all you need to do is
493-
to declare "org.slf4j:slf4j-log4j12" as a dependency in your
494-
<em>pom.xml</em> file as shown below. In addition to
495-
<em>slf4j-log4j12-${latest.stable.version}.jar</em>, this will pull
496-
<em>slf4j-api-${latest.stable.version}.jar</em> as well as
497-
<em>log4j-${log4j.version}.jar</em> into your project. Note
498-
that explicitly declaring a dependency on
499-
<em>log4j-${log4j.version}.jar</em> or
500-
<em>slf4j-api-${latest.stable.version}.jar</em> is not wrong and may
501-
be necessary to impose the correct version of said artifacts by
502-
virtue of Maven's "nearest definition" dependency mediation
503-
rule.</p>
493+
<p><span class="label notice">log4j</span> As of version 1.7.35,
494+
declaring a dependency on <code>org.slf4j:slf4j-log4j12</code>
495+
redirects to <code>org.slf4j:slf4j-reload4j</code> by virtue of
496+
Maven &lt;relocation&gt; directive. </p>
504497

505498
<pre class="prettyprint source">&lt;dependency>
506499
&lt;groupId>org.slf4j&lt;/groupId>
@@ -517,12 +510,12 @@ <h3 class="doAnchor" name="projectDep">Declaring project
517510
framework, all you need to do is to declare
518511
"org.slf4j:slf4j-jdk14" as a dependency in your <em>pom.xml</em>
519512
file as shown below. In addition to
520-
<em>slf4j-jdk14-${latest.stable.version}.jar</em>, this will pull
521-
<em>slf4j-api-${latest.stable.version}.jar</em> into your project.
522-
Note that explicitly declaring a dependency on
523-
<em>slf4j-api-${latest.stable.version}.jar</em> is not wrong and may
524-
be necessary to impose the correct version of said artifact by
525-
virtue of Maven's "nearest definition" dependency mediation
513+
<em>slf4j-jdk14-${latest.stable.version}.jar</em>, this will
514+
pull in <em>slf4j-api-${latest.stable.version}.jar</em> into
515+
your project. Note that explicitly declaring a dependency on
516+
<em>slf4j-api-${latest.stable.version}.jar</em> is not wrong and
517+
may be necessary to impose the correct version of said artifact
518+
by virtue of Maven's "nearest definition" dependency mediation
526519
rule.</p>
527520

528521
<pre class="prettyprint source">&lt;dependency>

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

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

43+
<hr noshade="noshade" size="1"/>
44+
45+
<h3>2022-01-25 - Release of SLF4J 1.7.35</h3>
46+
47+
<p>&bull; In this release, the "slf4j-log4j12" artifact
48+
automatically instructs Maven to use the "slf4j-reload4j" artifact
49+
instead. As you might have guessed, the "slf4j-reload4j" binding
50+
delegates log processing to the reload4j logging framework.
51+
</p>
52+
53+
<p>The <a href="https://reload4j.qos.ch">reload4j</a> project is a
54+
fork of Apache log4j version 1.2.17 with the goal of fixing
55+
pressing security issues. It is intended as a drop-in replacement
56+
for log4j version 1.2.17. By drop-in, we mean the replacement of
57+
log4j.jar with reload4j.jar in your build with no source code
58+
changes in .java files being necessary.
59+
</p>
60+
61+
<p>&bull; Fix incorrect version number in the relocation element
62+
in <em>slf4j-log4j12/pom.ml</em>. This issue was reported in <a
63+
href="https://jira.qos.ch/browse/SLF4J-539">SLF4J-539</a> by
64+
Alexander Veit.
65+
</p>
66+
67+
<h3>2022-01-25 - Release of SLF4J 1.7.34</h3>
68+
69+
<p>The relocation element in slf4j-log4j12 had incorrect
70+
version number. Version 1.7.34 should not be used.
71+
</p>
72+
4373
<h3>2022-01-13 - Release of SLF4J 2.0.0-alpha6</h3>
4474

4575
<p class="highlight">The the 2.0.x series requires Java&nbsp;8 and
Loading
-69.6 KB
Loading

0 commit comments

Comments
 (0)