2.18.0
- Release date
-
2022-06-28
This release primarily contains bug fixes and minor enhancements.
Due to a break in compatibility in the SLF4J binding, Log4j now ships with two versions of the SLF4J to Log4j adapters.
log4j-slf4j-impl
should be used with SLF4J 1.7.x and earlier and log4j-slf4j18-impl
should be used with SLF4J 1.8.x and later.
SLF4J-2.0.0 alpha releases are not fully supported.
See LOG4J2-2975 and SLF4J-511.
The Log4j 2.18.0 API, as well as many core components, maintains binary compatibility with previous releases.
Apache Log4j 2.18.0 requires a minimum of Java 8 to build and run. Log4j 2.12.4 is the last release to support Java 7. Log4j 2.3.2 is the last release to support Java 6. Java 6 and Java 7 are no longer supported by the Log4j team.
For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Log4j 2 website.
Added
-
Add support for Jakarta Mail API in the SMTP appender. (LOG4J2-3362)
-
Add support for custom Log4j 1.x levels. (LOG4J2-3419)
-
Add support for adding and retrieving appenders in Log4j 1.x bridge. (LOG4J2-3440)
-
Add support for custom LMAX disruptor WaitStrategy configuration. (LOG4J2-3472)
-
Add support for Apache Extras' RollingFileAppender in Log4j 1.x bridge. (LOG4J2-3483)
-
Add MutableThreadContextMapFilter. (LOG4J2-3495)
-
Add support for 24 colors in highlighting (LOG4J2-3538)
Changed
-
Improves ServiceLoader support on servlet containers. (LOG4J2-3427)
-
Make the default disruptor WaitStrategy used by Async Loggers garbage-free. (LOG4J2-3473)
-
Do not throw UnsupportedOperationException when JUL ApiLogger::setLevel is called. (LOG4J2-3476)
-
Support Spring 2.6.x. (LOG4J2-3506)
-
Move perf tests to log4j-core-its (LOG4J2-3516)
-
Upgrade the Flume Appender to Flume 1.10.0 (LOG4J2-3536)
Fixed
-
Fix minor typo #792.
-
Improve validation and reporting of configuration errors.
-
Allow enterprise id to be an OID fragment. (LOG4J2-1376)
-
Fix problem with non-uppercase custom levels. (LOG4J2-2872)
-
Avoid ClassCastException in JeroMqManager with custom LoggerContextFactory #791. (LOG4J2-3040)
-
DirectWriteRolloverStrategy should use the current time when creating files. (LOG4J2-3339)
-
Fixes the syslog appender in Log4j 1.x bridge, when used with a custom layout. (LOG4J2-3359)
-
log4j-1.2-api 2.17.2 throws NullPointerException while removing appender with name as null. (LOG4J2-3359)
-
Improve JsonTemplateLayout performance. (LOG4J2-3393)
-
Fix resolution of non-Log4j properties. (LOG4J2-3413)
-
Fixes Spring Boot logging system registration in a multi-application environment. (LOG4J2-3418)
-
JAR file containing Log4j configuration isn’t closed. (LOG4J2-3423)
-
Properties defined in configuration using a value attribute (as opposed to element) are read correctly. (LOG4J2-3424)
-
Syslog appender lacks the SocketOptions setting. (LOG4J2-3425)
-
Log4j 1.2 bridge should not wrap components unnecessarily. (LOG4J2-3426)
-
Update 3rd party dependencies for 2.18.0. (LOG4J2-3428)
-
SizeBasedTriggeringPolicy would fail to rename files properly when integer pattern contained a leading zero. (LOG4J2-3432)
-
Fixes default SslConfiguration, when a custom keystore is used. (LOG4J2-3439)
-
Fixes appender concurrency problems in Log4j 1.x bridge. (LOG4J2-3447)
-
Fix and test for race condition in FileUtils.mkdir(). (LOG4J2-3452)
-
LocalizedMessage logs misleading errors on the console. (LOG4J2-3458)
-
Add missing message parameterization in RegexFilter. (LOG4J2-3475)
-
Add the missing context stack to JsonLayout template. (LOG4J2-3477)
-
HttpWatcher did not pass credentials when polling. (LOG4J2-3481)
-
UrlConnectionFactory.createConnection now accepts an AuthorizationProvider as a parameter. (LOG4J2-3482)
-
The DirectWriteRolloverStrategy was not detecting the correct index to use during startup. (LOG4J2-3490)
-
Async Loggers were including the location information by default. (LOG4J2-3491)
-
ClassArbiter’s newBuilder method referenced the wrong class. (LOG4J2-3493)
-
Don’t use Paths.get() to avoid circular file systems. (LOG4J2-3527)
-
Fix parsing error, when XInclude is disabled. (LOG4J2-3531)
-
Fix LevelRangeFilterBuilder to align with log4j1’s behavior. (LOG4J2-3534)
-
Fixes problem with wrong ANSI escape code for bright colors (LOG4J2-3537)
-
Log4j 1.2 bridge should generate Log4j 2.x messages based on the parameter runtime type.