2.20.0
- Release date
-
2023-02-17
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.20.0 API, as well as many core components, maintains binary compatibility with previous releases.
Apache Log4j 2.20.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 timezones in
RollingFileAppenderdate pattern (LOG4J2-1631) -
Add
LogEventtimestamp toProducerRecordinKafkaAppender(LOG4J2-2678) -
Add
PatternLayoutsupport for abbreviating the name of all logger components except the 2 rightmost (LOG4J2-2785) -
Removes internal field that leaked into public API. (LOG4J2-3615)
-
Add a
LogBuilder#logAndGet()method to emulate theLogger#traceEntrymethod. (LOG4J2-3645)
Changed
-
Simplify site generation (1166)
-
Switch the issue tracker from JIRA to GitHub Issues (1172)
-
Remove liquibase-log4j2 maven module (1193)
-
Fix order of stacktrace elements, that causes cache misses in
ThrowableProxyHelper. (1214) -
Switch from
com.sun.mailto Eclipse Angus. (LOG4J2-3554) -
Add Log4j2 Core as default runtime dependency of the SLF4J2-to-Log4j2 API bridge. (LOG4J2-3601)
-
Replace
maven-changes-pluginwith a custom changelog implementation (LOG4J2-3628) -
Moved
log4j-apiandlog4j-coreartifacts with classifierteststolog4j-api-testandlog4j-core-testrespectively. (LOG4J2-3650)
Deprecated
-
Deprecate support for package scanning for plugins (LOG4J2-3644)
Fixed
-
Copy programmatically supplied location even if
includeLocation="false". (1197) -
Eliminate status logger warning, when
disableAnsiornoConsoleNoAnsiis used the style and highlight patterns. (1202) -
Fix detection of location requirements in
RewriteAppender. (1274) -
Replace regex with manual code to escape characters in Rfc5424Layout. (1277)
-
Fix
java.sql.Timeobject formatting inMapMessage(LOG4J2-2297) -
Fix previous fire time computation in
CronTriggeringPolicy(LOG4J2-3357) -
Correct default to not include location for
AsyncRootLoggers (LOG4J2-3487) -
Lazily evaluate the level of a SLF4J
LogEventBuilder(LOG4J2-3598) -
Fixes priority of Legacy system properties, which are now back to having higher priority than Environment variables. (LOG4J2-3615)
-
Protects
ServiceLoaderUtilfrom uncheckedServiceLoaderexceptions. (LOG4J2-3624) -
Fix
Configurator#setLevelfor internal classes (LOG4J2-3631) -
Fix level propagation in
Log4jBridgeHandler(LOG4J2-3634) -
Disable
OsgiServiceLocatorif not running in OSGI container. (LOG4J2-3642) -
When using a Date Lookup in the file pattern the current time should be used. (LOG4J2-3643)
-
Fixed
LogBuilderfiltering in the presence of global filters. (LOG4J2-3647)


