SLF4J News
Please note that you can receive SLF4J related announcements by subscribing to the QOS.ch announce mailing list.
On the 2.0.x series
The the 2.0.x series requires Java 8 and
adds a backward-compatible fluent logging api.
Moreover, SLF4J has been modularized per JPMS/Jigsaw
specification. The resulting internal changes are detailed in the FAQ
page.
SLF4J 2.0.x series requires Java 8. It builds upon the 1.8.x
series and adds a backward-compatible fluent logging api. By
backward-compatible, we mean that existing logging frameworks do
not have to be changed for the user to benefit from the fluent
logging API. However, existing frameworks must migrate to the
ServiceLoader
mechanism. The resulting internal
changes are detailed in the FAQ page.
Starting early 2022, logback artifacts are binary reproducible, as independently attested by reproducible-central.
2024-08-10 - Release of SLF4J 2.0.16
• The information about the provider
LoggerFactory
connected with will now be
reported using the level DEBUG and will not be printed by
default.
• A bit-wise identical binary of this version can be reproduced by building from source code at commit 101086ba359a6a80f275ad090f57d74a34eee8ca associated with the tag v_2.0.16. Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
2024-08-08 - Release of SLF4J 2.0.15
• Fixed issue with stale MANIFEST.MF files. This issue was raisied in issue 421 by Ed Merks.
• A bit-wise identical binary of this version can be reproduced by building from source code at commit 5321a975d46e47a651fb93642a2a77bb1e2cef82 associated with the tag v_2.0.15. Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
2024-08-07 - Release of SLF4J 2.0.14
• LoggerFactory
will now print the provider
type it connects with at initializaiton time.
• It is now possible to obtain the version of SLF4J in use
by calling Slf4jEnvUtil.slf4jVersion()
method.
• A bit-wise identical binary of this version can be reproduced by building from source code at commit 3e5a572850d5b60ca707515d49a525dd5e098346 associated with the tag v_2.0.14. Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
2024-04-12 - Release of SLF4J 2.0.13
• Fixed issue with wrapped loggers where location information would not be computed correctly. This fixes issue issues/409 reported by Moritz Waser who also provided the relevant PR.
• The binary of this version can be reproduced by checking out the tag v_2.0.13 from the source code repository (GitHub). Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
2024-02-06 - Release of SLF4J 2.0.12
• Various providers, e.g. slf4j-simple, slf4j-nop and
slf4j-jdk14 modules, now export their packages and allow reflection
by the org.slf4j
module in their respective
module-info.java
files. This allows for loading via
reflection when a provider is specified via "slf4j.provider" in
system properties in Jigsaw modular applications. This issue was
raised by Robert Scholte in issue/393.
• Reverted removal of Util.report
methods
which were removed by mistake in slf4j version 2.0.10 and breaking
compatibility with logback-classic.
• The binary of this version can be reproduced by checking out the tag v_2.0.12 from the source code repository (GitHub). Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
2024-01-08 - Release of SLF4J 2.0.11
• This release reinstates the `renderLevel()` method in
SimpleLogger
which was removed by mistake. A few
methods had their access modifiers changed from 'package' to
'protected'. These changes were requested by Guillaume Nodet who
also provided the relevant patches.
• The binary of this version can be reproduced by checking out the tag v_2.0.11 from the source code repository (GitHub). Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
2024-01-02 - Release of SLF4J 2.1.0-alpha1 (EXPERIMENTAL)
• This release reverts to Java 8 as a base requirement at runtime. Given the diffusion and popularity of SLF4J as a logging API, the extra work involved in supporting Java 8 is worth the effort.
2023-12-28 - Release of SLF4J 2.1.0-alpha0 (EXPERIMENTAL)
• Added MDCAmbit
class to assists in the creation and removal (aka closing) of MDC
entries. For commenting see discussion
372. The changes are such that existing logging providers do not need to be modified.
• Several new methods such as arg() and variants and kv() and variants in the fluent API. See the LoggingEventBuilder javadocs for details. For commenting see discussion 376. The changes are such that existing logging providers do not need to be modified.
• Bumped required Java version to 11. For commenting see discussion 379.
2023-12-28 - Release of SLF4J 2.0.10
• SLF4J now uses the newly introduced Reporter
class to report
messages about its internal state. The behaviour of Reporter can be
altered using the "slf4j.internal.report.stream" and
"slf4j.internal.verbosity" system properties. See internal messages FAQ entry
for further details. This feature was requested in issue 361 by
Garret Wilson.
• The slf4j-api module now exports version 1.7 of
the org.slf4j.helper
package in its MANIFEST.MF
file. This was requested
in PR 358 by
Konrad Windszus.
• Removed unreachable code in the versionSanityCheck
method in LoggerFactory
class. This problem was
reported in issue 371 by
Róbert Papp.
• The binary of this version can be reproduced by checking out the tag v_2.0.10 from the source code repository (GitHub). Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
2023-09-03 - Release of SLF4J 2.0.9
• It is now possible to specify the provider class explicitly via the "slf4j.provider" system property. This bypasses the service loader mechanism for finding providers and may shorten SLF4J initialization. This change was requested in SLF4J-450 by Chris Lee with Kengo Toda providing the relevant PR.
• Added a Bill of Materials (BOM) file to the project. This was a frequently requested addition as expressed in SLF4J-437. Garret Wilson's Improving the Maven Bill of Materials (BOM) Pattern document was instrumental in making this happen.
• Added a module-info.java file to jul-to-slf4j module. This was requested in SLF4J-596 by Gili Tzabari.
• Fixed typo in the name of the
SLF4JPlarformLoggerFactory
class which was renamed as
SLF4JPlatformLoggerFactory
. This issue was raised in
SLF4J-598 by
Ethan McCue who also provided the relevant PR.
• The slf4j-jdk-platform-logging module now uses
MessageFormat
as specified in the API javadocs of System.Logger#log
method. This issue was reported in SLF4J-529 by Taku
Miyakawa who also provided the relevant patch.
• The binary of this version can be reproduced by checking out the tag v_2.0.9 from the source code repository (GitHub). Release built using Java "20" 2023-03-21 build 20+36-2344 under Linux Debian 11.6.
2023-09-03 - Release of SLF4J 2.0.8
This release included an erroneous system property key for "sfl4j.provider" and was almost immediately superseded by version 2.0.9.
2023-03-17 - Release of SLF4J 2.0.7
• Fixed several OSGi MANIFEST.MF related issues, namely SLF4J-581, SLF4J-579 and SLF4J-583. Many thanks to Hannes Wellmann for providing the relevant PRs and for his precious collaboration..
• Fixed missing javadoc artifacts. This issue was repoerted by Witalij Berdinskich in SLF4J-584.
• SLF4J artifacts now include a LICENSE.txt file in published artifacts. This enhancement was requested by Tobias Wittmann in SLF4J-582.
• The binary of this version can be reproduced by checking out the tag v_2.0.7 from the source code repository (GitHub). Release built using Java "19" 2022-09-20 build 19+36-2038 under Linux Debian 11.2.
2022-12-12 - Release of SLF4J 2.0.6
• When replaying events occuring during initialization, the
LoggerFactory#replaySingleEvent
method now applies
filtering by level by invoking the filtering methods of the
underlying logging system whereas previous the underlying system
was invoked without filtering. This fixes SLF4J-575 reported
by Patrick Doyle.
• Artifacts creation now invokes the BND tool to generate OSGi headers, in particular "uses" clases. This fixes SLF4J-574 reported Jonah Graham who also provided the relevant PR.
• The binary of this version can be reproduced by checking out the tag v_2.0.6 from the source code repository (GitHub). Release built using Java "19" 2022-09-20 build 19+36-2038 under Linux Debian 11.2.
2022-11-25 - Release of SLF4J 2.0.5
• If a SecurityManager
is installed, then
LoggerFactory
will now load providers as a privileged
action by invoking
AccessController.doPrivileged()
. This will allow
Wildfy-Core to upgrade to SLF4J 2.0.x as discussed in PR 304
contributed by Piotr P. Karwasz.
• The binary of this version can be reproduced by checking out the tag v_2.0.5 from the source code repository (GitHub). Release built using Java "19" 2022-09-20 build 19+36-2038 under Linux Debian 11.2.
2022-11-17 - Release of SLF4J 2.0.4
• LoggerFactory
now uses the class loader that
loaded LoggerFactory
class itself to find providers of
type SLF4JServiceProvider
. Previously, the thread
context class loader was used. This was unintentional and the
current behavior more closely matches that of the SLF4J 1.7 series
and earlier. This tentatively fixes SLF4J-544 as well
as several other related/duplicating issues.
• The MANIFEST.MF
files of slf4j-api,
slf4j-jdk14, slf4j-nop, slf4j-reload4j and slf4j-simple modules now
declare the appropriate OSGi Require-Capability
and
Provide-Capability
statements in relation to
org.slf4j.spi.SLF4JServiceProvider
service. This fixes
SLF4J-572
reported by Stefan Bischof who also provided the relevant PR.
• The binary of this version can be reproduced by checking out the tag v_2.0.4 from the source code repository (GitHub). Release built using Java "19" 2022-09-20 build 19+36-2038 under Linux Debian 11.2.
2022-09-28 - Release of SLF4J 2.0.3
• Fixed a bug in Reload4jLoggerAdapter
when
used in conjunction with the fluent API, the timestamp would not be
correctly set. This issue was reported
in SLF4J-546 by
Joseph Walton.
• The binary of this version can be reproduced by checking out the tag v_2.0.3 from the source code repository (GitHub). Release built using Java "19" 2022-09-20 build 19+36-2038 under Linux Debian 11.2.
2022-09-20 - Release of SLF4J 2.0.2
• Fixed bug in the setContextMap()
method
of Reload4jMDCAdapter
. This issue was reported
in SLF4J-563 by
Michael Wartes.
• The binary of this version can be reproduced by checking out the tag v_2.0.2 from the source code repository (GitHub). Release built using Java "18" 2022-03-22 build 18+36-2087 under Linux Debian 11.2.
2022-09-14 - Release of SLF4J 2.0.1
• The Logger.makeLoggingEventBuilder
method
semantics has changed so that overriding implementations should now
always build a new LoggingEventBuilder
instance as
appropraiate for the implementation, i.e the logging backend. For
more details see SLF4J-560.
• Deprecated unused LoggerFactoryBinder
and
MarkerFactoryBinder
classes. This issue was raised in
SLF4J-555 by
Witalij Berdinskich who provided the relevant patch.
• The binary of this version can be reproduced by checking out the tag v_2.0.1 from the source code repository (GitHub). Release built using Java "18" 2022-03-22 build 18+36-2087 under Linux Debian 11.2.
2022-08-20 - Release of SLF4J 2.0.0
• Except minor javadoc changes, this release is identical to 2.0.0-beta1 released earlier this month.
• The binary of this version can be reproduced by checking out the tag v_2.0.0 from the source code repository (GitHub). Release built using Java "18" 2022-03-22 build 18+36-2087 under Linux Debian 11.2.
2022-08-06 - Release of SLF4J 2.0.0-beta1
• Methods in the LoggingEventBuilder
interface
returning an instance of LoggingEventBuilder
are now
annotated with @CheckReturnValue
. This allows compile
time detection of missing calls to one of the terminating
log()
methods. Many thanks to Yuriy Artamonov and
Vladimir Sitnikov for their help and valuable suggestions on this
matter.
Support for this check is included in IntelliJ IDEA out of the box. For more information on this feature in IntelliJ IDEA, select File → Setting → Editor → Inspections and then Java → Probable Bugs → "Result of method call ignored".
As for Eclipse, this feature has been requested in bug 572496.
• The binary of this version can be reproduced by checking out the tag v_2.0.0-beta1 from the source code repository (GitHub). Release built using Java "18" 2022-03-22 build 18+36-2087 under Linux Debian 11.2.
2022-08-05 - Release of SLF4J 2.0.0-beta0
• After
a long
debate,
added setMessage(String)
, setMessage(Supplier<String>)
and log()
methods to
the LoggingEventBuilder
interface.
• The binary of this version can be reproduced by checking out the tag v_2.0.0-beta0 from the source code repository (GitHub). Release built using Java "18" 2022-03-22 build 18+36-2087 under Linux Debian 11.2.
2022-03-17 - Release of SLF4J 2.0.0-alpha7
• Mirroring the change in the 1.7.x series, in this release also the "slf4j-log4j12" artifact automatically instructs Maven to use the "slf4j-reload4j" artifact instead. As you might have guessed, the "slf4j-reload4j" binding delegates log processing to the reload4j logging framework.
The reload4j project is a fork of Apache log4j version 1.2.17 with the goal of fixing pressing security issues. It is intended as a drop-in replacement for log4j version 1.2.17. By drop-in, we mean the replacement of log4j.jar with reload4j.jar in your build with no source code changes in .java files being necessary.
• The log(LoggingEvent)
method in
DefaultLoggingEventBuilder
now invokes
setCallerBoundary()
method in order to correctly set
the caller boundary. The caller boundary information can be used by
logging implementations to compute caller information. This fixes
SLF4J-511.
• Correct corrupt "Export-Package" declaration in MANIFEST.MF in log4j-over-slf4j module. This fixes SLF4J-541 reported by Flavio Donzé.
• The binary of this version can be reproduced by checking out the tag v_2.0.0-alpha7 from the source code repository (GitHub). Release built using Java "18" 2022-03-22 build 18+36-2087 under Linux Debian 11.2.
2022-02-08 - Release of SLF4J 1.7.36
Correct corrupt "Export-Package" declaration in MANIFEST.MF in log4j-over-slf4j module. This fixes SLF4J-541 reported by Flavio Donzé.
Starting with version 1.7.36, slf4j releases will be reproducible. By reproducible we mean that anyone checking out the code corresponding to the release version from source code repository and building that local copy, will obtain an identical binary to the published binary.
2022-01-25 - Release of SLF4J 1.7.35
• In this release, the "slf4j-log4j12" artifact automatically instructs Maven to use the "slf4j-reload4j" artifact instead. As you might have guessed, the "slf4j-reload4j" binding delegates log processing to the reload4j logging framework.
The reload4j project is a fork of Apache log4j version 1.2.17 with the goal of fixing pressing security issues. It is intended as a drop-in replacement for log4j version 1.2.17. By drop-in, we mean the replacement of log4j.jar with reload4j.jar in your build with no source code changes in .java files being necessary.
• Fix incorrect version number in the relocation element in slf4j-log4j12/pom.ml. This issue was reported in SLF4J-539 by Alexander Veit.
2022-01-25 - Release of SLF4J 1.7.34
The relocation element in slf4j-log4j12 had incorrect version number. Version 1.7.34 should not be used.
2022-01-13 - Release of SLF4J 2.0.0-alpha6
• SLF4J now ships with the slf4j-reload4j module delegating to the reload4j backend. Reload4j is a drop-in replacement for log4j version 1.2.17.
• SimpleLogger
now prints the thread Id if
instructed to do so. This fixes SLF4J-499 requested
by Michael Osipov
2022-01-13 - Release of SLF4J 1.7.33
• SLF4J now ships with the slf4j-reload4j module delegating to the reload4j backend. Reload4j is a drop-in replacement for log4j version 1.2.17.
• SimpleLogger
now prints the thread Id if
instructed to do so. This fixes SLF4J-499 requested
by Michael Osipov
30th of August, 2021 - Release of SLF4J 2.0.0-alpha5
• The META-INF/services/java.lang.System$LoggerFinder file in slf4j-jdk-platform-logging module now has the correct contents. This fixes SLF4J-521 initially reported by Benjamin Manes with Nicolai Parlog providing the relevant PR.
12th of August, 2021 - Release of SLF4J 2.0.0-alpha4
• Added support for the Java Platform Logging API (JEP 264) in the new slf4j-jdk-platform-logging module. JEP 264 was added in Java 9. Many thanks to Nicolai Parlog for providing the relevant PR.
10th of August, 2021 - Release of SLF4J 2.0.0-alpha3
In addition to fixes imported from the 1.7 branch, such as SLF4J-515, this version consists of changes visible only to frameworks implementing the SLF4J API.
- In
DefaultLoggingEventBuilder
, theinnerLog(LoggingEvent)
method was renamed aslog
and its visibility changed toprotected
. - In
DefaultLoggingEventBuilder
, theloggingEvent
andlogger
fields have their visibility changed toprotected
. - The
getRequesteApiVersion
method inSLF4JServiceProvider
was renamed as getRequestedApiVersion. This fixes SLF4J-516.
Fixed resource path to NOPServiceProvider
in
slf4j-nop module. This fixes SLF4J-518.
20th of July, 2021 - Release of SLF4J 1.7.32
In the slf4j-simple module, SimpleLogger
now caters
for concurrent access. This fixes SLF4J-515 as
reported by Tibor Digana.
2nd of July, 2021 - Release of SLF4J 2.0.0-alpha2
• Fixed important bug in the fluent API. The
LoggingEventBuilder.addArgument(Supplier)
method now
takes Supplier<?>
and not
Supplier<Object>
. This problem was reported in
SLF4J-485 by
Christoffer Hammarström who also provided a relevant test case.
• Added support for the native OSGi service loader mechanism as described in SLF4J-457. Our gratitude goes to Björn Kautler for providing the relevant PR.
•Fixed incorrect location information computation when fluent API is used. This issue was reported in SLF4J-511 by Ralph Goers.
Printing methods in the LoggerWrapper
class part of
slf4j-ext spuriously called MessageFormatter.format()
method before delegating logging to the wrapped logger. However,
the wrapped logger invoked MessageFormatter.format()
a
second time. The second call is usually innocuous unless the String
representation of any of the arguments contain the anchor
character, for example if an argument is an empty
Set
. The spurious calls to
MessageFormatter.format()
were removed fixing SLF4J-421 and SLF4J-287.
• The implementations of the
MDCAdapter.setContextMap()
methods shipping with SLF4J
now cater for a null argument. This fixes SLF4J-414. Both
Alexei Orischenko and Kengo TODA kindly provided PRs for this
issue.
18th of June, 2021 - Release of SLF4J 1.7.31
In the jcl-over-slf4j module avoid Object
to
String
conversion. This issue was reported in SLF4J-497 by Antonio
Tomac who also provided the relevant PR.
In the log4j-over-slf4j module added empty constructors for ConsoleAppender. This fixes SLF4J-514 as requested by Simon F (bratkartoffel).
16th of December, 2019 - Release of SLF4J 1.7.30
Fixed a memory leak in case of no provided binding and multithreaded initialization as described in SLF4J-469. Many thanks to David Harsha to providing the relevant PR.
31st of October, 2019 - Release of SLF4J 1.7.29
In the pom file for jcl-over-slf4j module, the Apache license is now explicitly mentioned. In previous versions, the Apache license for the jcl-over-slf4j was mentioned in java source code and the LICENSE.txt file.
October 1st, 2019 - Release of SLF4J 2.0.0-alpha1
• Refactored the fluent-api in
org.slf4j.Logger
interface to ease the work required
by downstream implementations.
• By default, when using the fluent-API
org.slf4j.Logger
will merge into the message part any
marker and key-value data passed to it. Non default implementation
are encouraged to implement a more customizable behavior.
• Fix the double back-end initialization problem reported in SLF4J-463 by Dan Groves who also provided a test-case to reproduce the problem and a relevant fix.
• Fixed incorrect handling of Throwable
as
last parameter in SLF4J-466.
10th of August, 2019 - Release of SLF4J 1.7.28
• Added Automatic-Module-Name
in
MANIFEST.MF files in various SLF4J artifacts. This fixes
SLF4J-420 as
reported by Gael Lalire.
The module names to JMPS automatic module name mappings are listed in the table below.
Maven artifact/module | JMPS module name |
---|---|
slf4j-api | org.slf4j |
slf4j-jdk14 | org.slf4j.jul |
slf4j-nop | org.slf4j.nop |
slf4j-simple | org.slf4j.simple |
jcl-over-slf4j | org.apache.commons.logging |
log4j-over-slf4j | org.apache.log4j |
• Fixed incorrect use of TRACE
level in one of
the debug()
printing methods in
EventRecodingLogger
class. This corrects SLF4J-460 as
reported by Kevin Goveia.
6th of August, 2019 - Release of SLF4J 1.7.27
This version had the incorrect "Automatic-Module-Name" for the
log4j-over-slf4j
artifact. Please use version 1.7.28
or later which contain correct automatic module names.
13th of June, 2019 - Release of SLF4J 2.0.0-alpha0
The the 2.0.x series requires Java 8 and adds a backward-compatible fluent logging api.
SLF4J version 2.0.0 requires Java 8. It builds on the 1.8.x series and adds a backward-compatible fluent logging api. By backward-compatible, we mean that existing logging frameworks do not have to be changed for the user to benefit from the fluent logging API.
2019 - Release of SLF4J 1.8.0-beta5
Fixed ignored Throwable issue in log4j-over-slf4j as reported in SLF4J-233 by John Vasileff.
In all relevant MANIFEST.MF files set the
Bundle-RequiredExecutionEnvironment
directive to
JavaSE-1.6
. This fixes SLF4J-449 as
reported by Larissa Smirnova.
JDK14LoggerAdapter
is now aware of being enclosed
in a SubstituteLogger
and computes caller data
accordingly. This fixes SLF4J-445 reported
by Alexander Yevsyukov.
In the slf4j-ext package, marked the ch.qos.cal10n package as optional. This fixes SLF4J-439 reported by Mike Mansell.
February 19th, 2019 - Release of SLF4J 1.8.0-beta4
In the 1.8.x series, SLF4J has been modularized per JPMS/Jigsaw specification. The resulting internal changes are detailed in the FAQ page.
The the 1.8.x series requires Java 6 or
later as slf4j-api now relies on the ServiceLoader
mechanism to find its logging backend. ServiceLoader
is available in Java 6 and later.
In the 1.8.x series, SLF4J has been modularized
per JPMS/Jigsaw
specification. The resulting internal changes are detailed in the FAQ
page. Moreover, SLF4J now requires Java 6 or later as
slf4j-api now relies on
the ServiceLoader
mechanism to find its logging backend. ServiceLoader
is available in Java 6 and later.
SLF4JBridgeHandler
now correctly handles null
messages. This fixes SLF4J-99 (again) and
SLF4J-409 as
reported by Devin Smith.
For reasons of coherency, the Automatic-Automatic-Module-Name for the jul-to-slf4j module is now "jul.to.slf4j". In the earlier versions of Java 9 the string "to" within "jul.to.slf4j" was incorrectly interpreted as a reserved keyword. This bug has been fixed in later versions of the JDK, in particular JDK 11.
SLF4J modules are now multi-release jar files. This fixes compatibility issues in certain legacy environments, as described for example in SLF4J-456.
Fixed CVE-2018-8088
by removing the EventData
EventException
EventLogger
classes in the same way as done in SLF4J
1.7.26.
Removed MDCStrLookup
class in
org.slf4j.ext
package which relied on
commons-lang
. Thus, slf4j-ext
module no
longer depends on commons-lang
fixing SLF4J-454.
February 16th, 2019 - Release of SLF4J 1.7.26
Due to popular demand in relation to CVE-2018-8088,
EventData
, EventException
and
EventLogger
classes were removed from the
org.slf4j.ext
package located in the
slf4j-ext
module.
The aforementioned vulnerability has a low severity but was incorrectly marked critical in the National Vulnerability Database.
21st of March, 2018 - Release of SLF4J 1.8.0-beta2
Automatic module name for the artifact jul-to-slf4j.jar is jul.to.slf4j. However, to is a reserved keyword within ModuleDeclaration and ModuleDirective productions (Java 9). By declaring the following in MANIFEST file of said artifact we avoid this problem.
Automatic-Module-Name: jul_to_slf4j
In later versions of Java 9 this problem was fixed and we reverted to jul.to.slf4j in 1.8.0-beta3 and later.
See also SLF4J-428.
Fix incorrect use of log levels in
EventRecodingLogger
. This fixes SLF4J-411 reported
by Doug Roper.
The class org.slf4j.ext.EventData
is now marked as
deprecated in preparation for its removal due to a security
vulnerability. In subsequent releases this class well be removed
without replacement. See
also SLF4J-430
and SLF4J-431.
January 30th, 2018 - Release of SLF4J 1.8.0-beta1
Fix Travis build issues as reported in SLF4J-427 by Brett Randall who also provided the relevant PR.
Added a createdPostInitialization
final public
variable in SubstituteLogger.
Fixed typo in SubstituteServiceProvider
class
name. See also SLF4J-426.
Updated slf4j-api module's MANIFEST.MF file "Bundle-RequiredExecutionEnvironment" entry value to J2SE-1.6.
October 20th, 2017 - Release of SLF4J 1.8.0-beta0
Given that the same package name in different modules is a
showstopper in Java 9, the org.slf4j.impl
package has
been removed from all slf4j modules. In other words starting with
slf4j 1.8.0-beta0 "providers" will no longer act as 1.7.x/1.6.x
"bindings". See the relevant FAQ entry for
details.
April 25th, 2017 - Release of SLF4J 1.8.0-alpha2
The JPMS module names for log4j-over-slf4j
and
jcl-over-slf4j
are now based on the names of the
artifacts they are intended to replace, respectively log4j v1 and
commons-logging with the presumed module names "log4j" and
"org.apache.commons.logging". This fixes SLF4J-408 reported
by Stephen Colebourne.
Removed unnecessary export of org.slf4j.jul package in
module-info.jar of slf4j-jdk14
artifact. This issue
has been reported in SLF4J-407 by
Stephen Colebourne.
April 13th, 2017 - Release of SLF4J 1.8.0-alpha1
Removed spurious System.out.println in the slf4j-log4j12 module. See SLF4J-406 for details.
April 7th, 2017 - Release of SLF4J 1.8.0-alpha0
SLF4J has been modularized per JPMS/Jigsaw specification. The resulting internal changes are detailed in the FAQ page.
Due to the lack of interest, slf4j-android and slf4j-jcl modules have been dropped with no replacement.
March 16th, 2017 - Release of SLF4J 1.7.25
In slf4j-simple module, added a configuration option to enable/disable caching of the System.out/err target. This enhancement was requested in SLF4J-395 by Hervé Boutemy.
Refactored several internal methods in SimpleLogger
in order to ease its extension. This enhancement was requested in
SLF4J-394 by
Hervé Boutemy.
Updates the serialVersionId
of
BasicMarker
in order to ease diagnosis of
serialization issues with this class.
February 23rd, 2017 - Release of SLF4J 1.7.24
In its MANIFEST.MF file, the jcl-over-slf4j module now declares
exporting org.apache.commons.logging
version "1.2"
instead of version "1.1.1". Otherwise, no java code has
changed. The change was requested in SLF4J-383 reported
by Florian Kolbe and only affects OSGi environments.
Fix performance bottleneck in BasicMarker
which now
uses a CopyOnWriteArray
instead of a
Vector
. This problem was raised in SLF4J-240 by Ralph
Goers.
CAL10N is now declared as an optional dependency of slf4j-ext. This fixes SLF4J-369 reported by Matej Spiller-Muys.
February 15th, 2017 - Release of SLF4J 1.7.23
Update to SLF4J version 1.7.23 to enable slf4j-log4j12 to run under Java 9.
When running under Java 9, log4j version 1.2.x is unable to correctly parse the "java.version" system property. Assuming an incorrect Java version, it proceeded to disable its MDC functionality. The slf4j-log4j12 module shipping in this release fixes the issue by tweaking MDC internals by reflection, allowing log4j to run under Java 9. See also SLF4J-393.
Fixed issue EventRecodingLogger
not saving marker
data in the event. This issue was reported in SLF4J-379 by Manish
Soni with Jonas Neukomm providing the relevant PR.
The slf4j-simple module now uses the latest reference to System.out or System.err. In previous releases the reference was set at the beginning and re-used. This change fixes SLF4J-389 reported by Igor Polevoy.
December 13th, 2016 - Release of SLF4J 1.7.22
Add support for OFF level in SimpleLogger
. This
feature was requested in SLF4J-332.
Allow re-initialization of SimpleLogger
by
"friends". This change was requested in SLF4J-370 by
Christian Schulte.
April 4th, 2016 - Release of SLF4J 1.7.21
Fixed a memory leak due to a race-condition occurring during
SLF4J initialization. In that case, some
SubstituteLogger
instances may continue to accumulate
log events until the JVM eventually runs out of memory. This issue
was reported in SLF4J-364 by Jeff
Flanigan.
LoggerFactory
makes sure to release all resources
referenced by SubstituteLoggerFactory
post-initialization. See also SLF4J-366
March 29th, 2016 - Release of SLF4J 1.7.20
Releases 1.7.19 and 1.7.20 suffer from a memory leak. Please use version 1.7.21 or later instead.
Fixed initialization problem encountered on the Google App Engine platform with SLF4J version 1.7.19 but not other versions. The problem was reported in SLF4J-363 by Osvaldo Pinali Doederlein.
March 14th, 2016 - Release of SLF4J 1.7.19
Releases 1.7.19 and 1.7.20 suffer from a memory leak. Please use version 1.7.21 or later instead.
Fixed NullPointerException
thrown by
org.slf4j.helpers.SubstituteLogger.isDelegateEventAware(SubstituteLogger.java:353). This
issue was reported by Jeffrey Zhao in SLF4J-361.
Initialization of the slf4j-log4j12 module is now thread safe fixing SLF4J-358.
Initialization of the slf4j-jdk14 module is now thread safe fixing SLF4J-359.
26th of February, 2016 - Release of SLF4J 1.7.18
Initialization of the slf4j-simple module is now thread safe fixing SLF4J-356.
Fixed Import-Package statement in MANIFEST.MF for the slf4j-log4j12 module. This issue was reported by Mathieu Sebire in SLF4J-357 who also provided the relevant pull request.
19th of February, 2016 - Release of SLF4J 1.7.17
When running under Android, skip binding ambiguity check during initialization for better performance. The fix introduced in version 1.7.14 was not effective.
11th of February, 2016 - Release of SLF4J 1.7.16
The MANIFEST.MF
file in slf4j-api.jar module was
missing an export statement for the org.slf4j.event
package. MANIFEST.MF
files in other modules were
missing the mirroring import statements.
9th of February, 2016 - Release of SLF4J 1.7.15
In previous versions of SLF4J, if the application was already multithreaded at the time the first SLF4J logger was created, logs made during the SLF4J initialization phase were lost. New code added in relation with SLF4J-353 fixes this problem by storing and replaying logging calls made during initialization.
24th of January, 2016 - Release of SLF4J 1.7.14
The assignment of the INITIALIZATION_STATE variable in
LoggerFactory
is now guaranteed to be consistent for
multi-thread initializations. More specifically, only one thread
will see INITIALIZATION_STATE as UNINITIALIZED with all other
threads observing either ONGOING_INITIALIZATION or the final result
of the initialization. However, SLF4J initialization is still
non-blocking and re-entrant, in the sense that if some thread tries
to obtain loggers during ongoing initialization by another (or
same) thread, instances of SubstituteLogger
are
returned. This fixes SLF4J-167.
Moved delegation check loop from log4j-over-slf4j.jar to slf4j-log4j12.jar for better targeted loop checks. The rationale behind the change is explained by Frans Orsel in SLF4J-345 who also provided the relevant pull request.
During initialization the binding ambiguity check is skipped under Android in order to improve performance. This change was requested by Nitin Verma in SLF4J-328 who also provided the relevant patch.
The StaticMarkerBinder
and
StaticMDCBinder
classes shipping in various SLF4J
bindings now offer a getSingleton()
method. The
org.slf4j.MDC
and MarkerFactory
classes
now perform binding by invoking the getSingleton()
method first and if in the presence of an older version of SLF4J
with said method missing, then by accessing the SINGLETON
field. This backward compatible change was requested by Rufus
Alexander in SLF4J-347 in order
to implement an SLF4J binding in Clojure, namely slf4j-timbre.
Fix the OSGI Bundle-Version
property in the
MANIFEST.MF of osgi-over-slf4j module. This issue was
reported by Antoine Dessaigne in SLF4J-341.
10th of November, 2015 - Release of SLF4J 1.7.13
Fixed LoggerFactory
initialisation problem in
presence of SecurityManager denying "createSecurityManager" runtime
permission. See SLF4J-324 for
further details.
Fixed issue with BasicMDCAdapter
leaking MDC
information to non-child threads. This problem was reported by
Lukasz Cwik in SLF4J-316 who also
provided the relavant pull request.
More robust handling of ill-formatted input strings by SLF4JBridgeHandler. This issue was reported in SLF4J-337 by Rodolfo Udo Labsch.
House cleaning of our project's Maven pom.xml files, an initiative undertaken by Jeremy Landis.
Added getAdditivity()
method method in
Category
class in the log4j-over-slf4j module. This
addition was requested by Milo Felipe SLF4J-309 with
Dimitrios Liapis providing the relavant pull request.
Added the assertLog(boolean, String)
method in the
Category
class, in module log4j-over-slf4j.
In the log4j-over-slf4j module, removed misplaced Layout.java file. This issue was reported in SLF4J-218 by Joshua M Steward with Alfredo Ramos providing the relavant pull request.
March 26th, 2015 - Release of SLF4J 1.7.12
All java files have been reformatted to with the code formatter style defined in codeStyle.xml. This style uses 4 spaces for indentation and a maximum line width of 160.
As SLF4J requires JDK 1.5 or later, the
Bundle-RequiredExecutionEnvironment
declaration in the
various MANIFEST files have been updated to J2SE-1.5.
Added missing Bundle-ManifestVersion attribute in the MANIFEST files in log4j-over-slf4j. The issue was raised in SLF4J-231 by Nikolas Falco who also provided the appropriate pull request.
Added getAppender(String)
method in
Category
class in the log4j-over-slf4j module. This
addition was requested by Ramon Gordillo in SLF4J-319.
Added setThreshold
method in
AppenderSkeleton
class in the log4j-over-slf4j
module. This addition was requested by Dimitrios Liapis who also
provided the appropriate pull request.
Added getParent
method in Category
class in the log4j-over-slf4j module. This addition was requested
by Himanshu Bhardwaj in SLF4J-318.
6th of January, 2015 - Release of SLF4J 1.7.10
The MDC.putCloseable
method now explicitly returns
MDC.MDCloseable
instead of the more generic
java.io.Closeable
. This in turn allows one to write
try-with-resources statement without a catch clause. Many thanks to
William Delanoue for proposing this change.
The various constructors in FileAppender
in the
log4j-over-slf4j module are now public.
16th of December, 2014 - Release of SLF4J 1.7.9
Spot
incorrectly named loggers by setting the
slf4j.detectLoggerNameMismatch
system property to
true.
Spot incorrectly named
loggers by setting the
slf4j.detectLoggerNameMismatch
system property to
true. This significant feature was contributed by Alexander
Dorokhine.
Added MDC.putCloseable
method so that it can be
used as a closeable
resource under Java 7.
Added getContext
method returning a hashtable in
org.apache.log4j.MDC in the log4j-over-slf4j module.
The introduction of the @Nonnull JSR 305 annotation in SLF4J version 1.7.8 causes the Scala compiler to fail. This is issue has been documented in SI-5420. Given that many Scala users will be affected by this issue for the foreseeable future, we have decided to renounce the user of JSR 305 annotations in SLF4J for the time being.
Numerous small code improvements too minor to be listed here.
4th of April, 2014 - Release of SLF4J 1.7.7
SFL4J API now uses generics. This enhancement was contributed by Otavio Garcia. Due to erasure of generics in Java, the changes are backward-compatible.
The slf4j-migrator can now convert statements using the long deprecated
Category
class.
Added the SimpleLayout
and
FileAppender
classes to the log4j-over-slf4j
module.
February 5th, 2014 - Release of SLF4J 1.7.6
Added slf4j-android module to the slf4j distribution. This module is contributed by Andrey Korzhevskiy.
Loggers created during the initialization phase are no longer
NOPLoggers
which drop all logging calls. Instead,
SLF4J now creates substitute loggers which delegate to the
appropriate logger implementation after the initialization phase
completes. Only calls made to these loggers during the
initialization phase are dropped. This enhancement was proposed in
SLF4J-302
by Chetan Mehrotra.
Improvements to the exit()
and
throwing()
methods in XLogger
. This
enhancement was requested in SLF4J-188.
Concurrency improvement in MessageFormatter
. This
improvement was contributed by Vivek Pathak in a pull
request.
Concurrency improvement in
BasicMarkerFactory
. This improvement was contributed
by Mikhail Mazursky in a pull
request.
JCLLoggerAdapter
was incorrectly invoking
isDebugEnabled
calls in its trace()
methods. This issue was reported in SLF4J-272.
In the log4j-over-slf4j module, the setLevel
method
in the Category
class. This fixes SLF4J-270. Alfredo
Ramos provided the relevant patch.
In the log4j-over-slf4j module, added empty implementations for
OptionHandler
, WriterAppender
,
ConsoleAppender
and AppenderSkeleton
classes.
25th of March, 2013 - Release of SLF4J 1.7.5
Given the significance of these performance improvements, users are highly encouraged to migrate to SLF4J version 1.7.5 or later.
performance improvements The
logger factories in most SLF4J modules namely in jcl-over-slf4j,
log4j-over-slf4j, slf4j-jcl, slf4j-jdk14, slf4j-log4j12, and
slf4j-simple now use a ConcurrentHashMap
instead of a
regular HashMap
to cache logger instances. This change
significantly improves logger retrieval times at the cost of some
memory overhead. This improvement was requested in SLF4J-289
by Taras Tielkes who also provided the relevant patch.
18th of March, 2013 - Release of SLF4J 1.7.4
Added a package private reset()
method to
SimpleLoggerFactory
for testing purposes.
15th of March, 2013 - Release of SLF4J 1.7.3
The jul-to-slf4j bridge now correctly handles cases where the message string contains {}-placeholders but has no or zero parameters. This fixes SLF4J-203. The relevant patch was provided by Matthew Preston in a git pull request.
Added missing methods and classes in log4j-over-slf4j module for Velocity compatibility. This issue was reported in SLF4J-271 by Thomas Mortagne.
11th of October, 2012 - Release of SLF4J 1.7.2
Added osgi-over-slf4j module which serves as an OSGi LogService implementation delegating to slf4j. This module is maintained by Matt Bishop and Libor Jelinek.
Christian Trutz added missing PatternLayout class as well as
several methods in the Logger
and
Category
classes. See commit 442e90ba5785cba9 dated
September 27th 2012 for details.
Added org.slf4j.simpleLogger.warnLevelString in slf4j-simple module.
Fixed SLF4J-263. All
Logger
implementations shipping with SLF4J use
Object...
instead of Object[]
to avoid
compiler warnings.
14th of September, 2012 - Release of SLF4J 1.7.1
SimpleLogger
now supports writing to a file. The property names for configuring
SimpleLogger
have been modified to be consistently in
camel case. More configuration options have been added. In the
absence of configuration directives, SimpleLogger
will
behave exactly the same as in the past. If you are one of the
few users configuring SimpleLogger
with configuration
properties, you will need to adapt to the new and more consistent
property names.
6th of September, 2012 - Release of SLF4J 1.7.0
SLF4J now requires JDK 1.5.
Printing methods in the Logger interface now offers variants accepting varargs instead of Object[]. Given that under the hood, the Java compiler transforms varargs into an array, this change is totally 100% no-ifs-or-buts backward compatible with all existing client code.
The logger field (of type java.util.logging.Logger
)
in JDK14LoggerAdapter
is now marked as transient. This
fixes SLF4J-252,
a serialization problem reported by Thorbjørn Ravn
Andersen.
11th of June, 2012 - Release of SLF4J 1.6.6
Source repository has been moved to https://github.com/qos-ch/slf4j on GitHub.
In case multiple bindings are found on the class path, SLF4J will now output the name of the framework/implementation class it binds with.
SimpleLogger now supports configuration properties.
LoggerWrapper in the slf4j-ext module now correctly deals with markers. This fixes bug #265 reported by Dario Campagna.
The log4j-over-slf4j module now supports legacy projects
providing their own log4j LoggerFactory
. This fixes bug #234
reported by Laurent Pellegrino with Piotr Jagielski providing the
appropriate patch.
4th of June, 2012 - Release of SLF4J 1.6.5
In the slf4j-log4j12 module, upgraded the log4j dependency to version 1.2.17.
Added removeHandlersForRootLogger() method to SLF4JBridgeHandler
class.
The log4j-over-slf4j module now exports all its packages in its manifest. This issue was reported in 262 by Mikhail Mazursky who also provided the relevant patch.
October 31st, 2011 - Release of SLF4J 1.6.4
Fixed in thread-safety issues in BasicMDCAdapter
fixing bug
#203 and bug
#224. Note that BasicMDCAdapter
is only used with
the slf4j-jdk14.jar binding.
BasicMDCAdapter
invoked a method introduced in JDK
1.5 preventing it from running under JDK 1.4. Interestingly enough,
this issue has never been reported by the user community.
October 17th, 2011 - Release of SLF4J 1.6.3
LogEvent
class in slf4j-ext module now correctly
passes the event data as a parameter object. This fixes bug #246
reported by Ralph Goers.
Added missing OSGi manifest to the jul-to-slf4j module. This fixes bug #166 reported by Ekkehard Gentz.
In the log4j-over-slf4j module, added missing
getAllAppenders
() method in Category
class. This fixes bug #235
reported by Anthony Whitford.
August 19th, 2011 - Release of SLF4J 1.6.2
Fixed bug #138. SLF4J will no longer complain about multiple SLF4J bindings when running under a Weblogic server.
Fixed bug
#228. When running under IBM's JDK, and if no binding can be
found, SLF4J will no longer throw a
NoClassDefFoundError
. Instead, it will default to an
NOP implementation. Under the same circumstances but with Sun's
JDK, SLF4J already defaulted to an NOP implementation since release
1.6.0.
Added certain missing classes to the log4j-over-slf4j module as requested in bug 225 by Josh Stewart.
July 5th, 2010 - Release of SLF4J 1.6.1
Updated log4j dependency to version 1.2.16 and CAL10N dependency to version 0.7.4.
Fixed missing versioning OSGi metadata in the log4j-over-slf4j module. This problem was reported in bug 187 by David Savage.
May 8th, 2010 - Release of SLF4J 1.6.0
It is expected that all SLF4J releases in the 1.6.x series will be mutually compatible.
As of SLF4J version 1.6.0, in the absence of an SLF4J binding, slf4j-api will default to a no-operation implementation discarding all log requests. Thus, instead of throwing an exception, SLF4J will emit a single warning message about the absence of a binding and proceed to discard all log requests without further protest. See also the relevant section in the user manual.
In the presence of multiple parameters and if the last argument in a logging statement is an exception, then SLF4J will now presume that the user wants the last argument to be treated as an exception and not a simple parameter. See the relevant FAQ entry for further details. This fixes bug 70 submitted by Joern Huxhorn who also provided the relevant patch.
The log
method in LocationAwareLogger
interface now admits an additional parameter of type
Object[]
representing additional arguments of the log
request. Due to this modification, slf4j-api version 1.6.x will not
work with bindings shipping with SLF4J 1.5.x -- bindings shipping
with 1.6.x must be used.
Fixed bug 150 by
implementing missing resetConfiguration()
and
shutdown()
methods in LogManager
(in
log4j-over-slf4j) as nop. In addition, the
getCurrentLoggers()
method has been implemented by
returning an empty enumeration.
Fixed bug 170 by
a bare-bones implementation of the NDC
class in
log4j-over-slf4j.
Fixed bug 175 by synchronizing access to the loggerNameList field.
Fixed bug 164 observed when SLF4J artifacts were placed under java.endorsed.dirs.
Fixed suboptimal list type usage in
SLF4JLogFactory
as reported in bug 179 by
Sebastian Davids.
Fixed documentation inconsistency in SLF4JLog
as
reported in bug 180 by
Sebastian Davids.
February 25th, 2010 - Release of SLF4J 1.5.11
Users yet unfamiliar with SLF4J sometimes unknowingly place both
log4j-over-slf4j.jar and slf4j-log4j12.jar
simultaneously on the class path causing stack overflow
errors. Simultaneously placing both jcl-over-slf4j.jar and
slf4j-jcl.jar on the class path, is another occurrence of
the same general problem. As of this version, SLF4J preempts the
inevitable stack overflow error by throwing an exception with
details about the actual cause of the problem. This is deemed to be
better than leaving the user wondering about the reasons of the
StackOverflowError
.
Fixed bug
168. In case log4j-over-slf4j is used and a logback appender
requires a third party library which depends on log4j, the
log(String FQCN, Priority p, Object msg, Throwable t)
method in log4j-over-slf4j's Category class would throw an
UnsupportedOperationException
. Problem reported by Seth
Call.
December 3rd, 2009 - Release of SLF4J 1.5.10
SLF4J version 1.5.10 consist of bug fixes and minor
enhancements. It is totally backward compatible with SLF4J version
1.5.8. However, the slf4j-ext module ships with a new package called
org.slf4j.cal10n
which adds localized/internationalized logging
support as a thin layer built upon the CAL10N API.
SLF4J-android, maintained by Thorsten Möller, was added as a daughter project of SLF4J.
Added missing "Export-Package" declaration for cal10n in the OSGi manifest file for sfl4j-ext. This was requested in bug 156 by Pete Muir.
In log4j-over-slf4j, added missing log(...) methods as requested by Zoltan Szel in bug report 139.
In log4j-over-slf4j, added missing LogManager
class
as requested by Rick Beton in bug report
150.
In the slf4j-ext module, added
getCopyOfChildTimeInstruments
and
getCopyOfGlobalStopWatch
methods to the
Profiler
class. This enables developers to build their
own output formatters for a given Profiler. This feature was
requested by David Lindelöf in bug 141.
Fixed a NullPointerException
occurring in unspecified
conditions as described in bug report
146 by Dapeng Ni.
Added missing OSGi manifest to the log4j-over-slf4j module as requested by Wade Poziombka in bug 117.
OSGi manifests produced by SLF4J now replace the '-' character by '.' in compliance with the OSGi specification. This fixes bug 152 according to the patch supplied by Hugues Malphettes.
Fixed packaging issue in jcl104-over-slf4j which inadvertently produced a jar file as described in bug 151 by Jesse McConnell.
June 11th, 2009 - Release of SLF4J 1.5.8
SLF4J version 1.5.8 consist of bug fixes. It is totally backward compatible with SLF4J version 1.5.7.
The Maven pom file for the log4j-over-slf4j
module
contained a compile-time dependency on the slf4j-jdk14
module. The dependency should have been declared in the test
scope. This problem was reported by Jean-Luc Geering on the slf4j
user list.
June 10th, 2009 - Release of SLF4J 1.5.7
SLF4J version 1.5.7 consist of bug fixes and minor enhancements. It is totally backward compatible with SLF4J version 1.5.6.
In SLF4J versions 1.5.5 and 1.5.6, the LoggerFactory
class which is at the core of SLF4J, if a version compatibility
issue was detected, accidentally invoked a method which was
introduced in JDK 1.5. Thus, instead of issuing a clear warning
message, SLF4J would throw a
NoClassDefFoundError
. Consequently, SLF4J would not run
with JDK 1.4 and earlier but only if a version incompatibility issue
was present. For example, if you were mixing
slf4j-api-1.5.6.jar with slf4j-simple-1.4.2.jar,
which are mutually incompatible. Please note that this bug affects
only SLF4J versions 1.5.5 and 1.5.6 and only in the
presence of incompatible versions of slf4j-api and its binding.
SLF4J will now emit a warning if more than one binding is present on the class path. This enhancement was proposed in bug 132 contributed by Robert Elliot.
The Log interface implementations in the jcl-over-slf4j module will now correctly cope with serialization. This fixes bug 79 reported by Mathias Bogaert. Many thanks to Eric Vargo for precisely identifying the problem and supplying the corresponding patch.
The log4j-over-slf4j module will now correctly interact with logging frameworks supporting location information such as java.util.logging and logback. This fixes bug 131 reported by Marc Zampetti.
SLF4JBridgeHandler
will no longer ignore log records
with an empty message. This fixes bug 108
reported by Pepijn Van Eeckhoudt and independently by Dan Lewis.
In case the toString()
method of a parameter throws
an exception, MessageFormatter
will now print an error
message, instead of letting the exception bubble higher up as
previously. This fixes bug 112
submitted by Joern Huxhorn.
November 21st, 2008 - Release of SLF4J 1.5.6
SLF4J version 1.5.6 consists of bug fixes. Users are encouraged to upgrade to SLF4J version 1.5.6. The upgrade should pose no problems. Nevertheless, you might still want to refer to the SLF4J compatibility report.
Fixed long standing LBCLASSIC-87 and
its younger sibling bug
113. With each call to getLogger() method,
LoggerContext
will now retrieve the ILoggerFactory
afresh from StaticLoggerBinder
. This change enables
context selectors of native implementations, e.g. logback, to work
correctly.
Fixed bug
114 reported by Jason Arndt. Corrected the way
XLogger
(in slf4j-ext) passes its fully qualified class
name so that the underlying logging system can correctly compute
location information.
The install()
method of
SLF4JBridgeHandler
will no longer reset the entire
j.u.l. environment but solely add a SLF4JBridgeHandler
instance to jul's root logger. By the same token, the
uninstall()
method will remove previously added
SLF4JBridgeHandler
instances without making any other
modifications to the j.u.l. configuration.
Added MDCStrLookup
to slf4j-ext. This class can be
used with Apache Commons Lang's StrSubstitutor
class to
inject values in the SLF4J MDC into strings. Information on
StrSubstitutor can be found at StrSubstitutor
javadoc.
October 17th, 2008 - Release of SLF4J 1.5.5
The version check mechanism introduced in SLF4J 1.5.4 was inconsistent with the large size of SLF4J's installed user base. We cannot expect external SLF4J implementations to align their release schedule with that of SLF4J. Consequently, this SLF4J version, namely 1.5.5, retains versions checks but as an elective process. For further details see the relevant entry in the FAQ.
You are highly encouraged to upgrade to SLF4J version 1.5.5. The upgrade should pose no problems. Nevertheless, you might still want to refer to the SLF4J compatibility report.
October 16th, 2008 - Release of SLF4J 1.5.4
This version corrects critical bugs.
Fixed critical bug
106. In previous versions of SLF4J, if during the initial
binding phase, the underlying logging system's default configuration
created or invoked loggers, a NullPointerException
would be thrown. Refer to the in error codes document for a
fuller explanation.
At initialization time, LoggerFactory will now check that the version of the slf4j-binding matches that of slf4j-api. If there is a mismatch a warning will be issued on the console. This should help users identify SLF4J related problems more quickly.
Improvements in documentation as well as fix for packaging problems related to slf4j-ext module.
SLF4JBridgeHandler (part of jul-to-slf4j) now accounts for loggers with resourceBundle as well parameters. This feature requested by Darryl Smith in bug 98 and by Jarek Gawor in bug 103.
We now say that markers contain references to other
markers. We no longer talk about child markers. The javadocs of the
Marker
interface have been updated to reflect this
change. Moreover, the hasChildren()
method in the
Marker interface has been deprecated and a new method called
hasReferences()
was added.
September 12th, 2008 - Release of SLF4J 1.5.3
See also the compatibility report for this version.
Added a new module called slf4j-ext for slf4j-extensions. See its documentation for further details.
Fixed bug 71 which was re-opened by Manfred Geiler. SLF4J loggers now survive serialization. By survive serialization, we mean that the deserialized logger instance are fully functional.
The fix for bug 68 as implemented in version 1.5.1 was incomplete. Michael Furman supplied a more complete fix which was incorporated in this release.
When slf4j bridges, e.g. jcl-over-slf4j or log4j-over-slf4j, were used in conjunction with JUL as the underlying logging system, JDK14LoggerAdapter created a LogRecord even for disabled log statements. This performance issue was reported in bug 90 by Matthew Mastracci.
Added support for array values, including multidimensional arrays, as parameters. For example,
log.debug("{} {}", "A", new int[] {1, 2}});
will print as "A [1, 2]" instead of "A [I@6ca1c" as previously. This enhancement was proposed by "lizongbo".
Parameter substitution code has been simplified. SLF4J now only cares about the "{}" formatting anchor, that is the '{' character immediately followed by '}'. Previously, the '{' had meaning on its own. As a result of this change, users no longer need to escape the '{' unless it is immediately followed by '}'. Existing messages which escaped standalone '{' character will be printed with a preceding backslash. However, no data loss in the printed messages will occur.
Added missing getInstance
methods to the
Category
class in the log4j-over-slf4j module, fixing
bug 95
reported by Michael Rumpf.
June 8th, 2008 - Release of SLF4J 1.5.2
Improvements to SLF4J documentation as well as fix of packaging problems related to jul-to-slf4j.jar and jcl104-over-slf4j.jar.
June 5th, 2008 - Release of SLF4J 1.5.1
See also the compatibility report for this version.
In order to support JCL version 1.1.1, the jcl104-over-slf4j module was renamed as jcl-over-slf4j. SLF4J will no longer ship with jcl104-over-slf4j.jar but with jcl-over-slf4j.jar. The related work responds to enhancement request discussed in issue 76 as reported by Niklas Gustavsson.
The slf4j-jcl binding now depends on commons-logging version 1.1.1 instead of the older 1.0.4
Added a java.util.logging to SLF4J bridge as requested in bug 38 by Christian Stein, David Smiley, Johan Ferner, Joern Huxhorn and others.
Fixed bug
68 reported by Su Chuan and David Rauschenbach. SLF4J requires
log4j 1.2.12 or later. However, if an older version of log4j is
present (lacking the TRACE level), in order to avoid
NoSuchMethodError exceptions, the SLF4J's
Log4jLoggerAdapter
will map the TRACE level as DEBUG.
Fixed bug
78 reported by Venu Thachappilly. If the argument array passed
to a Logger printing method (debug, info, etc.) was null, a
NullPointerException
was thrown. With the correction,
the messagePattern is returned as is, without parameter
substitution.
Added the getCopyOfContextMap
and
setContextMap
methods to the MDCAdapter
and org.sf4j.MDC
classes. This was requested in bug 84 by
Anton Tagunov.
Fixed bug
74, an endless recursion problem in Marker.contains method,
reported by Michael Newcomb. Also added he
getDetachedMarker
method to IMarkerFactor
and MarkerFactory
classes which was indirectly
requested in bug 74.
Added the methods getLevel()
and
getEffectiveLevel()
to the Category
class
in log4j-over-slf4j. This addition was requested in bug 74 by
Michael Newcomb.
The SLF4J Migrator tool has been improved to support migration from JUL to SLF4J.
In MarkerIgnoringBase
class, corrected mapping of
trace methods with markers to their equivalents without marker
data. Previously, the mapping was trace to debug. The incorrect
mapping affected only calls to the trace method with
markers. Interestingly enough, this bug was picked up by new unit
tests and has not been reported as a bug by our users.
February 26th, 2008 - Release of SLF4J 1.5.0
A tool called SLF4J Migrator now ships with SLF4J. It can help you migrate your project using JCL or log4j to use SLF4J instead.
Fixed bug
61 reported by Christopher Sahnwaldt. It is now possible to
place a backslash in front of a formatting anchor, by escaping the
backslash. For example, the call to
MessageFormatter.format("C:\\\\{}", "foo")
will now
correctly return "C:\\foo". The backslash character needs to be
escaped in Java, which leads to four backslashes.
Fixed bug
63 reported by Maarten Bosteels. SLF4J now supports MDC for
java.util.logging
package.
Fixed bug 64 reported by Michal Bernhard. The log4j binding will now alert the user if she uses SLF4J with a version of log4j earlier than 1.2.12.
Fixed bug 65 reported by Ben Gidley. Superfluous <version>${parent.version}</version> lines have been removed from pom.xml files. These lines reportedly confuse certain Maven repositories.
In the org.apache.log4j.Category
class, as
implemented in the log4j-over-slf4j module, calls to the printing
trace() are now correctly mapped to SLF4J's trace() printing method
(instead of debug()). Superfluous printing methods with the
signature xxxx(Object, Object)
and xxxx(String,
Object, Object)
have been removed.
Fixed bug 67 reported by Chris Custine. The manifest file for jcl104-over-slf4j now correctly declares version 1.0.4 for the exported JCL packages.
Fixed bug
69 reported by Joern Huxhorn, who graciously supplied the fix as
well as a test case. The add
method in
BasicMarker
class now correctly prevents multiple
addition of the same child. Moreover, the remove
method
now correctly removes the specified child marker.
Fixed bug 41 reported by Sebastian Davids. The manifest files of various projects now mention J2SE-1.3 as the required execution environment.
Fixed bug 71 reported by Manfred Geiler. The SLF4JLog and SLF4JLocationAwareLog classes are now serializable solving serialization problems encountered with certain libraries which attempt to serialize JCL log instances.
Fixed bug
73 reported by Oleg Smirsky. A "Fragment-Host: slf4j.api" line
has been added to every MANIFEST.MF file exporting
org.slf4j.impl
.
Fixed bug 72 reported by Ian Carr. Performance issues with slf4j-jdk14 for disabled log statements have now been corrected.
August 20th, 2007 - Release of SLF4J 1.4.3
Fixed bug 60 as reported by Costin Leau. OSGI manifest entries now declare the correct SLF4J version.
Clarified the behavior of the various methods in the MDC class with respect to "null" parameters. This was requested in bug 58 by Sebastian Davids.
Removed the slf4j-archetype module because nobody seems to have a use for it.
July 12th, 2007 - Release of SLF4J 1.4.2
The log4j-over-slf4j module has been moved back into SLF4J. Originally, this module was part of SLF4J and was moved into logback due to the lack of MDC support in SLF4J. With version 1.4.2 and the addition of MDC support in SLF4J 1.4.1, log4j-over-slf4j returns to its original home. Note that the previous name of the module was log4j-bridge.
Addition of the getMDCAdapter
method to
org.slf4j.MDC class. This allows access to the actual MDC
implementation which can on occasion come in very handy.
July 4th, 2007 - Release of SLF4J 1.4.1
SLF4J now supports Mapped Diagnostic Contexts (MDC) as requested by Andy Gerweck and Steve Ebersole in bug 49.
Fixed bug
53 as reported by Heinrich Nirschl. The public method
trace(String)
in the Log4jLoggerAdapter
class incorrectly called the underlying log4j logger with level DEBUG
instead of TRACE.
Fixed various documentation related errors kindly reported by Mark Vedder.
May 16th, 2007 - Release of SLF4J 1.4.0
In response to many user requests over time, the TRACE level has been added to org.slf4j.Logger interface. Please also see the FAQ entry discussing the TRACE level.
Fixed bug
47 as reported by Terry Todd. In previous a SLF4J release the
org.apache.commons.logging.impl.SLF4FLogFactory
class
was renamed as SLF4JLogFactory
. The
META-INF/services/org.apache.commons.logging.LogFactory
resource file had not reflected this change. It does now.
Eric Yung reported
that Apache commons-configuration access certain commons-logging
classes, namely org.apache.commons.logging.impl.NoOpLog
and SimpleLog, directly. Following Eric's suggestion,
jcl104-over-slf4j now includes the aforementioned classes.
April 15th, 2007 - Release of SLF4J 1.3.1
In response to a enhancement
request made by Michael Newcomb, a marker can now be detached
from the internal list of the MarkerFactory
that
generated it.
Fixed a silly but nonetheless annoying bug where log request of level ERROR made through jcl104-over-slf4j would log twice. This bug was reported and precisely described by Andrew Cooke.
February 25th, 2007 - Release of SLF4J 1.3.0
This release consists of rearrangement of classes among
projects. More specifically, the
org.slf4j.LoggerFactory
class is now packaged within
the slf4j-api.jar file instead of the various slf4j
bindings. It follows that client code needs to depend on only
slf4j-api in order to compile, while the various slf4j bindings are
only needed as runtime dependencies. See also the Maven2-related FAQ entry. Given the
practical significance of this change, we highly recommend that
library-authors upgrade to version 1.3 at their earliest
convenience.
Bug number 23 has been fixed, at the cost of minor and backward compatible changes. In other words, jcl104-over-slf4j now preserves caller location information.
It is now possible to obtain the root logger of the underlying logging implementation by requesting a logger named "ROOT". This feature was requested by Sebastien Davids in bug report 35.
For an exact list of changes please refer to the 1.3.0 compatibility report file as generated by clirr.
January 24th, 2007 - Release of SLF4J 1.2
This release includes several modifications to make SLF4J an OSGi-friendly framework. The modules' MANIFEST.MF files now include OSGi metadata. Regarding these improvements, and OSGi in general, the SLF4J project is happy to welcome John E. Conlon as a new committer.
Marker objects are now Serializable.
December 21st, 2006 - Release of SLF4J 1.1.0 (final)
This release consists of minor bug fixes and documentation changes. More importantly, the log4j-over-slf4j module has been moved to the logback project, under the name log4j-bridge.
Added the file "org.apache.commons.logging.LogFactory" under META-INF/services directory which went missing in the 1.1.0 series of SLF4J. This fixes a compatibility problem with Apache Axis which uses its own discovery mechanism, namely, commons-discovery version 0.2. The problem was reported in bug report 33 by David Varnes.
The file jcl104-over-slf4j.jar had various entries missing in its MANIFEST.MF file, as reported by Boris Unkel in bug number 30.
November 16th, 2006 - Release of SLF4J 1.1.0-RC1
This release consists of packaging related bug fix in addition to minor documentation changes.
Contrary to RC0, RC1 no longer uses SNAPSHOT versions for the slf4j-parent pom. The solution to Maven version problem does not work for public projects such as SLF4J because SNAPSHOTs are not allowed on ibiblio.
November 4th, 2006 - Release of SLF4J 1.1.0-RC0
This release consists of bug fixes. Moreover, since the major packaging related changes in 1.1.0-beta0 seem to work well, this release is marked as RC0.
Fixed the JDK 1.5 dependency for the SLF4J build, as reported by Boris Unkel in bug number 28. SLF4J now explicitly declares a dependency on JDK 1.4 in its pom.xml file.
Fixed an incorrect reference to the logback project in slf4j-api pom file. This bug was reported by Boris Unkel in bug number 29.
Fixed a synchronization problem in factories of almost all SLF4J bindings. This bug was reported independently by Howard M. Lewis Ship and Boris Unkel in bug reports 26 and respectively 27.
September 7th, 2006 - Release of SLF4J 1.1.0-beta0
Release 1.1.0-beta0 is a relatively important release with a refactoring of the way class files are organized in jar files. In previous releases, each binding was self-contained in a single jar file. In this release, each and every binding depends on slf4j-api.jar which contains the bulk of the classes required to use SLF4J, except for one or two adapter classes. Only the adapter classes are now shipped with each specific binding jar as appropriate for the underlying logging system..
This release is built using Maven instead of Ant. As for the java code, it has not been changed.
June 8th, 2006 - Release of SLF4J 1.0.2
Release 1.0.2 is a maintenance release containing bug fixes only.
- Fixed bug number
22 reported by Bjorn Danielsson. This version of the SLF4J API
will no longer systematically throw an exception when the
o.a.c.l.impl.SLF4FLogFactory#release()
method is invoked. Instead, therelease()
method will issue a warning.
May 1st, 2006 - Release of SLF4J 1.0.1
Release 1.0.1 is a maintenance release containing bug fixes only.
- Fixed bug number
20 reported by Steve Bate.
JDK14LoggerAdapter
will now correctly relay the logger name to the underlying JDK 14 logging system. - Added the file "org.apache.commons.logging.LogFactory" under META-INF/services directory in the jcl104-over-slf4j jar file. This fixes a compatibility problem with Apache Axis which uses its own discovery mechanism, namely, commons-discovery version 0.2. The bug was reported by Dave Wallace.
March 8th, 2006 - Release of SLF4J 1.0
This is release labeled as 1.0 (final) contains few relatively minor changes:
- As discussed
on the slf4j user list,
SimpleLogger
now directs its output to stderr instead of stdout. - Modified
JDK14LoggerAdapter
so that caller information is now correctly printed, as reported in bug 13 by Peter Royal. - Minor additions to the Marker interface.
February 4th, 2006 - Release of SLF4J 1.0-RC6 and NLOG4J 1.2.22
The MarkingLogger
interface has been removed and its
contents merged into org.slf4j.Logger
. This change
should not adversely affect end-users. However, SLF4J bindings need
to be updated. This has been done for all the bindings shipped with
SLF4J distribution as well as NLOG4J. As for x4juli, the update is
planned for its next release.
The merge between the MarkingLogger
and
Logger
interfaces has been motivated by the need to
allow end-users to easily switch between logging systems that
support markers and those that do not.
Added a default instance to SimpleLoggerFactory to serve as a last resort fallback mechanism. This instance is designed to be used by a very specific group of users, namely for those developing logging systems (e.g. log4j or LOGBack). It is not intended for end-users of the SLF4J API.
January 9th, 2006 - Release of SLF4J 1.0-RC5 and NLOG4J 1.2.21
A maintenance release correcting bugs #11 and #12 and in general improved resilience to null input parameters across implementations. Many thanks to Boris Unckel and Kenneth for reporting the null input issue.
December 27th, 2005 - Release of SLF4J 1.0-RC4 and NLOG4J 1.2.20
The printing methods in org.slf4j.Logger
interface
now support passing 3 or more parameters in an Object
array. This was a frequently requested feature missing in previous
versions of SLF4J.
NLOG4J 1.2.20 reflects the addition of new methods in the
org.slf4j.Logger
interface.
December 8th, 2005 - Release of SLF4J 1.0-RC3
Maintenance release fixing reported bugs #6 and #7.
November 28th, 2005 - Release of SLF4J 1.0-RC2
In response to a request by Greg Wilkins, this release adds the jar file slf4j-jcl.jar, an SLF4J binding for JCL. Please read the gradual migration section in the manual for more details.
November 21st, 2005 - Release of SLF4J 1.0-RC1
A maintenance release correcting bugs #4 and #5. Many thanks to Christian Beil for accurately reporting bug #4.
There has been also an effort to minimize the file sizes of the various jar files produced by SLF4J, resulting in jar files approximately 40% smaller than in version 1.0beta9.
Given that the SLF4J API is now deemed stable, this release is marked as RC1, that is release candidate number 1.
October 19th, 2005 - Release of SLF4J 1.0-beta9
The SLF4J distribution now includes two distinct bindings slf4j-log4j12.jar and slf4j-log4j13.jar in order to differentiate between log4j version 1.2 and version 1.3. This distinction is absolutely necessary because log4j 1.2 and 1.3 are not run-time compatible, although they are mostly compile-time compatible.
October 19th, 2005 - Release of SLF4J 1.0-beta8 and NLOG4J 1.2.18
Added a new SLF4J binding, slf4j-log4j.jar, intended to be used in conjunction with vanilla log4j.jar, as distributed by the Apache Logging Services project. The slf4j-log4j binding is quite similar in structure to the JDK 1.4 binding that existed previously.
The slf4j-log4j binding addresses compatibility problems which arose when copies of both log4j.jar and nlog4j.jar lay on the class path, in particular when it was undesirable or impossible to remove the preexisting log4j.jar file.
Methods in the org.slf4j.Logger
interface related to
markers were moved to a separate super interface called
org.slf4j.MarkingLogger
. This refactoring reduces
the weight of the
Logger
interface.
August 28th, 2005 - Release of SLF4J 1.0-beta7 and NLOG4J 1.2.17
Spurred by SLF4J-1, SLF4J binding code has been refactored and simplified. Logging systems implementing SLF4J interfaces have to have less work in order to bind with SLF4J. Moreover, these changes have no incidence on the published interface of SLF4J.
August 26th, 2005 - Release of SLF4J 1.0-beta6
To ease migration to SLF4J from JCL, this release includes a jar file called jcl-over-slf4j-1.0.4.jar. This jar file can be used as drop-in replacement for JCL version 1.0.4. It implements the public API of JCL using SLF4J underneath.
Thus, you can immediately benefit from the advantages of SLF4J without waiting for all the libraries you depend on to migrate to SLF4J first.
August 16th, 2005 - Release of NLOG4J 1.2.16
This release adds solves a compatibility problem between log4j and nlog4j. Previous to this release, code compiled with log4j would not run correctly with nlog4j.
With the fixes introduced in NLOG4J 1.2.16, code compiled with log4j 1.2.x will run without problems when deployed using NLOG4j.
However, the inverse is not true. Code compiled with nlog4j can only be deployed using nlog4j.
August 12th, 2005 - Release of SLF4J 1.0-beta5 and NLOG4J 1.2.15
This release adds support for the Marker interface. Thus, log statements can be decorated with Marker data allowing more expressive power in the processing of log statements.
For the sake of IoC frameworks, Logger
instances can
new be queried for their name.
With the addition of markers, subdomains are no longer needed.
The LoggerFactoryAdapter
has been simplified and
renamed as ILoggerFactory
.
July 5th, 2005 - Release of NLOG4J 1.2.14
This release fixes compatibility problems between NLOG4J and Jakarta Commons Logging.
June 28th, 2005 - Release of SLF4J 1.0-beta4 and NLOG4J 1.2.13
Following discussions on the SLF4J developers list, the
signatures of the printing methods in org.slf4j.Logger
interface have been modified to admit messages of type
String
instead of type Object
as
previously. The current set of printing methods is listed below.
void debug(String msg); void debug(String format, Object arg); void debug(String format, Object arg1, Object arg2); void debug(String msg, Throwable t); void error(String msg); void error(String format, Object arg;) void error(String format, Object arg1, Object arg2); void error(String msg, Throwable t); void info(String msg); void info(String format, Object arg); void info(String format, Object arg1, Object arg2); void info(String msg, Throwable t); void warn(String msg); void warn(String format, Object arg); void warn(String format, Object arg1, Object arg2); void warn(String msg, Throwable t);
NLOG4J release 1.2.13 reflects changes in the SLF4J API.
You can download SLF4J and NLOG4J, including full source code, class files and documentation on our download page.
May 17th, 2005 - SLF4J version 1.0-beta-3 released
In response to user comments, the org.slf4j.ULogger
interface has been renamed as org.slf4j.Logger
.
May 17th, 2005 - NLOG4J version 1.2.12 released
SLF4J.ORG is proud to release NLOG4J 1.2.12, a log4j-replacement
with native SLF4J API support. Except for users of LF5, chainsaw or
NTEvenAppender
, NLOG4J should be considered as a 100%
compatible, drop-in replacement for log4j version 1.2.9.
This release reflects changes in the SLF4J API, i.e. renaming of
org.slf4j.ULogger
interface as
org.slf4j.Logger
.
May 17th, 2005 - SLF4J version 1.0-beta-3 released
SLF4J.ORG is proud to release SLF4J 1.0-beta-3. In response to
user comments, the org.slf4j.ULogger
interface has been
renamed as org.slf4j.Logger
.
You can download SLF4J, including full source code, class files and documentation on our download page.
May 14th, 2005 - NLOG4J version 1.2.11 released
SLF4J.ORG is proud to release NLOG4J 1.2.11, a log4j-replacement
with native SLF4J API support. Except for users of LF5, chainsaw or
NTEvenAppender
, NLOG4J should be considered as a 100%
compatible, drop-in replacement for log4j version 1.2.9.
You can download NLOG4J version 1.2.11, including full source code, class files and documentation on our download page.
May 4th, 2005 - SLF4J version 1.0-beta-2 released
SLF4J.ORG is proud to release SLF4J 1.0-beta-2. This release contains cosmetic or javadoc changes. For example, the project has a new logo.
You can download SLF4J version 1.0-beta2, including full source code, class files and documentation on our download page.
1 May 2005 - not-log4j-1.2.10 released
Subsequent to the recall of log4j 1.2.10, SLF4J.ORG releases non-log4j-1.2.10 for those interested in SLF4J support in log4j.
You can download not-log4j version 1.2.10, including full source code, class files and documentation on our download page.
22 April 2005 - SLF4J project goes live
The SLF4J project site, including SVN repositories go live. Users can download SLF4J version 1.0-beta1.
15 April 2005 - start of work on SLF4J source code
Start of work on the SLF4j source code.
13 April 2005 - start of work on SLF4J project
Launch of the SLF4J project. Work has begun on the web-site, svn repositories as well as the source code.