From 28528094b94038fcd24cdc7fc4accf2190229de6 Mon Sep 17 00:00:00 2001 From: Ceki Gulcu Date: Thu, 13 Jan 2022 16:27:04 +0100 Subject: [PATCH] mentioned reload4j in the docs Signed-off-by: Ceki Gulcu --- pom.xml | 4 +-- slf4j-site/src/site/pages/codes.html | 4 +++ slf4j-site/src/site/pages/faq.html | 8 ++--- slf4j-site/src/site/pages/legacy.html | 14 +++++++++ slf4j-site/src/site/pages/manual.html | 45 +++++++++++++++++++++------ slf4j-site/src/site/pages/news.html | 2 ++ 6 files changed, 62 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 29aac0d9..957b7777 100755 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ - 1.7.32 + 1.7.33 8 ${jdk.version} @@ -46,7 +46,7 @@ 0.8.1 1.2.18.0 1.2.17 - 1.2.3 + 1.2.10 4.13.1 3.7.1 3.8.1 diff --git a/slf4j-site/src/site/pages/codes.html b/slf4j-site/src/site/pages/codes.html index 20e6f1da..6cf51e4d 100755 --- a/slf4j-site/src/site/pages/codes.html +++ b/slf4j-site/src/site/pages/codes.html @@ -461,6 +461,10 @@ class B extends A { StackOverflowError.

+

Note that since reload4j provides the log4j 1.x API, + reload4j.jar and log4j-over-slf4j.jar cannot be present + simultaneously on your classpath.

+

For more background on this topic see Bridging legacy APIs.

diff --git a/slf4j-site/src/site/pages/faq.html b/slf4j-site/src/site/pages/faq.html index 856203ff..b44f4881 100755 --- a/slf4j-site/src/site/pages/faq.html +++ b/slf4j-site/src/site/pages/faq.html @@ -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...

@@ -432,7 +432,7 @@ 1.7.x 2.0.x no bindings can be found warning message - 2.0.x providers do not act as 1.7.x/16.x + 2.0.x providers do not act as 1.7.x/1.6.x comptatible bindings @@ -469,7 +469,7 @@

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 @@

Fluent API requires version 2.0 If your code accesses the fluent API introduced in slf4j 2.0, then - your code will require version 2.0 or later.

+ your code will require slf4j-api version 2.0 or later.

diff --git a/slf4j-site/src/site/pages/legacy.html b/slf4j-site/src/site/pages/legacy.html index 6541f5ba..d642dc53 100755 --- a/slf4j-site/src/site/pages/legacy.html +++ b/slf4j-site/src/site/pages/legacy.html @@ -206,6 +206,20 @@ href="codes.html#log4jDelegationLoop">endless loop.

+

log4j-over-slf4j.jar + and slf4j-reload4j.jar cannot be present simultaneously +

+ +

The presence of slf4j-reload4j.jar, 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 log4j-over-slf4j.jar 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 endless loop. +

jul-to-slf4j bridge

diff --git a/slf4j-site/src/site/pages/manual.html b/slf4j-site/src/site/pages/manual.html index 592efccc..63fb063f 100755 --- a/slf4j-site/src/site/pages/manual.html +++ b/slf4j-site/src/site/pages/manual.html @@ -269,22 +269,37 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
slf4j-log4j12-${latest.stable.version}.jar
-
Binding for Binding/provider for log4j version 1.2, a widely used logging framework. You also - need to place log4j.jar on your class path.

+ need to place log4j.jar on your class path. Given that the log4j 1.x has reached EOL + status, we strongly encourage you to use + slf4j-reload4j instead. +

+ + +

slf4j-reload4j-${latest.stable.version}.jar +
+
since 1.7.33 Binding/provider for + reload4j + framework. Reload4j is a drop-in replacement for log4j version + 1.2.7. You also need to place reload4j.jar on your + class path.

+ +
slf4j-jdk14-${latest.stable.version}.jar
-
Binding for java.util.logging, also referred to as JDK 1.4 +
Binding/provider for java.util.logging, also referred to as JDK 1.4 logging

slf4j-nop-${latest.stable.version}.jar
-
Binding for Binding/provider for NOP, silently discarding all logging.

slf4j-simple-${latest.stable.version}.jar
-
Binding for Binding/provider for Simple 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
slf4j-jcl-${latest.stable.version}.jar
-
Binding for Binding/provider for Jakarta Commons Logging. This binding will delegate all SLF4J logging to JCL.

@@ -302,7 +317,7 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail

logback-classic-${logback.version}.jar (requires logback-core-${logback.version}.jar)
Native implementation There are also - SLF4J bindings external to the SLF4J project, e.g. logback which implements SLF4J natively. Logback's @@ -334,8 +349,20 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail to slf4j-api-${latest.stable.version}.jar, you simply drop one and only one 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.

+ + +

since 2.0.0 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 ServiceLoader + mechanism to find its logging backend. See the relevant FAQ entry for more + details. +

+ + +

Here is a graphical illustration of the general idea.

diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html index 1f790a3d..82b6759f 100755 --- a/slf4j-site/src/site/pages/news.html +++ b/slf4j-site/src/site/pages/news.html @@ -40,6 +40,8 @@ class names in --> +

2022-01-13 - Release of SLF4J 2.0.0-alpha6

+

30th of August, 2021 - Release of SLF4J 2.0.0-alpha5