| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| 2.25.0 source code.tar.gz | 2025-06-16 | 2.8 MB | |
| 2.25.0 source code.zip | 2025-06-16 | 8.1 MB | |
| README.md | 2025-06-16 | 9.3 kB | |
| Totals: 3 Items | 10.9 MB | 0 | |
This minor release introduces bug fixes, behavior improvements, and complete support for GraalVM native image generation.
GraalVM Reachability Metadata
Log4j Core and all extension modules now include embedded
GraalVM reachability metadata,
enabling seamless generation of native images with GraalVM out of the box—no manual configuration required.
For more information, refer to our GraalVM guide.
[!NOTE]
When building third-party Log4j plugins, using the newGraalVmProcessor
introduced in version2.25.0will automatically generate the required reachability metadata for GraalVM native images.
However, the processor will fail the build if the requiredlog4j.graalvm.groupIdandlog4j.graalvm.artifactIdparameters are not provided.
For detailed instructions, see Registering plugins.
Exception Handling in Pattern Layout
Exception handling in Pattern Layout has undergone a significant rewrite.
This update resolves several bugs and ensures consistent behavior across all exception converters.
Key improvements include:
- Stack traces are now consistently prefixed with a newline instead of other whitespace.
- The default exception converter has changed from extended to plain, offering better performance.
- Support for the
{ansi}option in exception converters has been removed.
Date & Time Formatting
Log4j has historically provided custom date and time formatters for performance, such as FixedDateFormat and FastDateFormat.
These are now deprecated in favor of Java’s standard DateTimeFormatter.
If you encounter formatting issues after upgrading—particularly with n or x directives—you can temporarily revert to the legacy formatters by setting the log4j2.instantFormatter property to legacy.
Please report any issues via our issue tracker.
ANSI Support on Windows
Modern Windows versions (10 and newer) provide native ANSI escape sequence support.
As a result, dependency on the outdated JAnsi 1.x library has been removed.
For details, refer to ANSI styling on Windows.
Jakarta JMS Appender
A Jakarta-compatible version of the JMS Appender is now included in the core distribution.
Added
- Add Google OSS-Fuzz integration (#2949)
- Add a
GraalVmProcessorannotation processor to generate GraalVM reachability metadata. (#3053) - Add
MonitorResourceconfiguration option to support the monitoring of external files in addition to the configuration file itself. (#3074, [#3501]) - Fixed typo in "LoggerConfig.RootLogger.Builder#withtFilter(...)" method. Created new corrected 'withFilter()' method and deprecated old method. (#3369)
- Add
collectionNameanddatabaseNamearguments to the MongoDB appender (#3467)
Changed
- Remove JAnsi library support. Windows 10 console has supported ANSI escapes since 2017. (#1736)
- Consolidate exception rendering logic and improve circular reference support in Pattern Layout (#2691, [#3123])
- Rewrite
JAnsiTextRendererto work without JAnsi library. (#2916) - Switch prefixing stack traces in Pattern Layout from whitespace to newline (#3045)
- Changes the layout used by the default configuration. (#3118)
- Switch to using Java's
DateTimeFormatterfor date & time formatting of log event instants (#3121, [#2943]) - Switch the default exception converter from the extended exception converter to the plain exception converter (#3123)
- Don't close StringReaders because of batching. (#3127)
- Switch prefixing stack traces in Status Logger from whitespace to newline (#3149)
- The MongoDb Appender shouldn't log a deprecation warning (#3149)
- Add improved validation to StringMatchFilter for null/empty text. (#3153)
- Improve sub-millisecond precision in Java 8 by overriding
SystemClock. (#3217) - Don't overwrite configured configuration name if config has no loggers/root logger. (#3431)
- Update
GcpLayout.jsonto improve compatibility with Google Cloud Logging (#3586) - Direct invocation of
java.util.Base64inBase64Utilinstead of reflection (#3686) - Improve
LogEvent.toImmutable(),ReusableMessage.memento(), and removeThrowableProxyusage
Deprecated
ThrowableProxyand all its usages (#2691, [#3123])AbstractLogger.checkMessageFactory()(#2936)FixedDateTime,FastDateTime, and supporting classes (#3121)- Use hard references to
Loggers inLoggerRegistry. (#3143)
Fixed
- Switch MongoDB tests to Docker (#2229)
- Add Jakarta-based JMS Appender and deprecate Javax version (#2995)
- Fix
RollingFileManagerto reopen file on unsuccessful rollover (#2592) - Fix exception rendering in Pattern Layout (LOG4J2-2170, LOG4J2-3627, [#1729], [#2691])
- Reload key/trust stores in TLS config (LOG4J2-2988, [#2767])
- Simplify
SSLContextinstantiation for TLS (#2767) - Add warning for Plugin Builder Attributes without public setter (#2769)
- Fix config reload from HTTP(S) source (#2937)
- Fix
putAll()in thread context map (#2942) - Improve HTTP Appender validation (#3011)
- Fix
getLogger()compatibility inlog4j-1.2-api(#3030) - Fix root exception property extraction in Pattern Layout (#3045)
- Fix key removal in Thread Context (#3048)
- Android-specific fixes (#3056)
- Prevent non-Log4j dependency leak in
log4j-bom(#3066, logging-parent#265) - Fix
o.a.l.Priorityto Log4j 2 Level conversion (#3085) - Sync
Logger.getLevel()andLogger.setLevel()(#3119) - Improve
AsyncWaitStrategyFactoryConfigvalidation (#3159) - Fix NPE with
rootLogger = LEVELsyntax (#3206) - Fix
ArrayIndexOutOfBoundsExceptionin JSON Template Layout (#3212) - Handle null
replacementinRegexReplacement(#3215) - Fix location requirement detection in
AsyncAppenderandFailoverAppender(#3257) - Correct Javadoc return for
isFiltered()(#3300) - Fix
Levelconverter documentation (#3359) - Fix
RecyclerFactoryConverterloading in JSON Layout (#3398) - Minimize
InternalLoggerRegistrylocking and clean up stale entries (#3399, [#3430], [#3681]) - Improve compile-time visibility for annotation libraries (#3437)
- Fix
shutdownDisableconfig (#2614) - Fix
ArrayIndexOutOfBoundsExceptioninStatusData#getFormattedStatus(#3562) - Deprecate/remove static hiding methods (#3601)
- Avoid stack poisoning on platforms without
SecurityManager(#3639) - Improve performance/memory use when logging primitive arrays (#3645)
- Fix
ArrayIndexOutOfBoundsExceptioninMessage.getFormattedMessage()(#3655) - StatusLogger now writes to
stderrby default (fixes regression in 2.23.0) (#3665) - Support
equals()betweenReadOnlyStringMapimplementations (#3669) - Accept Disruptor 4 in OSGi descriptor (#3706)
- Avoid surrogate handling in
JsonWriter
Removed
- Removed support for the
{ansi}option in Pattern Layout exception converters (#3045)
Updated
- Update
actions/staleto9.1.0(#3625) - Update
logback-coreto1.3.15(#3354) - Update
jackson-bomto2.19.0(#3708) - Update
spotbugs-annotationsto4.9.3(#3545) - Update
docker-maven-pluginto0.46.0(#3592) - Update
cassandra-allto3.11.19(#3440) - Update
commons-csvto1.14.0(#3559) - Update
commons-dbcp2to2.13.0(#3271) - Update
commons-pool2to2.12.1(#3422) - Update
kafka-clientsto3.9.1(#3678) - Update
logging-parentto12.1.1 - Update
tomcat-julito10.1.30(#2999) - Update
jetty-utilto9.4.57.v20241219(#3377) - Update
jmdnsto3.6.1(#3544) - Update
bsonto5.5.1(#3722) - Update
slf4j-apito2.0.17(#3499) - Update
spring-cloud-contextto4.3.0(#3700)