blob: c38a9ae4d867321c8652d30df8ef2ff782e9880f [file] [log] [blame]
---
layout: post
status: PUBLISHED
published: true
title: Log4j 2.13.2 Released
id: 0e978d09-2426-44bc-9843-0e63a19f3a56
date: '2020-04-25 05:53:34 -0400'
categories: logging
tags: []
permalink: logging/entry/log4j-2-13-2-released
---
<p>The Apache Log4j 2 team is pleased to announce the Log4j 2.13.2 release!</p>
<p>Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade<br />
to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides<br />
many other modern features such as support for Markers, lambda expressions for lazy logging,<br />
property substitution using Lookups, multiple patterns on a PatternLayout and asynchronous<br />
Loggers. Another notable Log4j 2 feature is the ability to be "garbage-free" (avoid allocating<br />
temporary objects) while logging. In addition, Log4j 2 will not lose events while reconfiguring.</p>
<p>The artifacts may be downloaded from <a href="https://logging.apache.org/log4j/2.x/download.html">https://logging.apache.org/log4j/2.x/download.html</a>.</p>
<p>This release contains bugfixes and minor enhancements.</p>
<p>Due to a break in compatibility in the SLF4J binding, Log4j now ships with two versions of the SLF4J to Log4j adapters.<br />
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<br />
later.</p>
<p>Note that the default XML, JSON and YAML formats changed in the 2.11.0 release: they no longer have the "timeMillis"<br />
attribute and instead have an "Instant" element with "epochSecond" and "nanoOfSecond" attributes. If the previous<br />
behavior is desired the "includeTimeMillis" attribute may be set to true on each of the respective Layouts.</p>
<p>The Log4j 2.13.2 API, as well as many core components, maintains binary compatibility with previous releases.</p>
<h2 id="ga-release-2-13-2">GA Release 2.13.2</h2>
<p>Changes in this version include:</p>
<h3 id="new-features">New Features</h3>
<ul>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-1360">LOG4J2-1360</a>:<br />
Provide a Log4j implementation of System.Logger. Thanks to Kevin Leturc.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2807">LOG4J2-2807</a>:<br />
Added EventLookup to retrieve fields from the log event.</li>
</ul>
<h3 id="fixed-bugs">Fixed Bugs</h3>
<ul>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2824">LOG4J2-2824</a>:<br />
Implement requiresLocation in GelfLayout to reflect whether location information is used in the message Pattern. Thanks to CrazyBills.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2588">LOG4J2-2588</a>:<br />
Add option to restore printing timeMillis in the JsonLayout.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2766">LOG4J2-2766</a>:<br />
Initialize pattern processor before triggering policy during reconriguration.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2810">LOG4J2-2810</a>:<br />
Add information about using a url in log4j.configurationFile.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2813">LOG4J2-2813</a>:<br />
serializeToBytes was checking wrong variable for null. Thanks to Keith D Gregory.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2814">LOG4J2-2814</a>:<br />
Fix Javadoc for ScriptPatternSelector.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2793">LOG4J2-2793</a>:<br />
Allow trailing and leading spaces in log level. Thanks to Renukaprasad C.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2791">LOG4J2-2791</a>:<br />
Correct JsonLayout timestamp sorting issue. Thanks to Johan Karlberg.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2817">LOG4J2-2817</a>:<br />
Allow the file size action to parse the value without being sensitive to the current locale. Thanks to Trejkaz.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2794">LOG4J2-2794</a>:<br />
Make YamlLayoutTest more resiliant to environmental differences. Thanks to Johan Karlberg.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2790">LOG4J2-2790</a>:<br />
Conditionally allocate PluginEntry during PluginCache loading. Thanks to Marius Volkhart.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2811">LOG4J2-2811</a>:<br />
Add missing includeLocation parameter when creating AsyncLogger. Thanks to Kuojian21.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2761">LOG4J2-2761</a>:<br />
Fix Exceptions when whitespace is in the file path and Java security manager is used. Thanks to Uwe Schindler.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2809">LOG4J2-2809</a>:<br />
Avoid NullPointerException when StackWalker returns null. Thanks to Romain Manni-Bucau.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2805">LOG4J2-2805</a>:<br />
TimeFilter did not handle daylight saving time transitions and did not support a range over 2 days.</li>
</ul>
<h3 id="changes">Changes</h3>
<ul>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2457">LOG4J2-2457</a>:<br />
Allow the file extension in the file pattern to be modified during reconfiguration.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2819">LOG4J2-2819</a>:<br />
Add support for specifying an SSL configuration for SmtpAppender.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2520">LOG4J2-2520</a>:<br />
Allow servlet context path to be retrieved without "/".</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2818">LOG4J2-2818</a>:<br />
Allow Spring Lookup to return default and active profiles.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2815">LOG4J2-2815</a>:<br />
Allow Spring Boot applications to use composite configuratons.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2779">LOG4J2-2779</a>:<br />
Add ContextDataProviders as an alternative to having to implement a ContextDataInjector.</li>
<li><a href="https://issues.apache.org/jira/browse/LOG4J2-2812">LOG4J2-2812</a>:<br />
[JDBC] Throw a AppenderLoggingException instead of an NPE in the JDBC database manager.</li>
</ul>
<hr>
<p>Apache Log4j 2.13.2 requires a minimum of Java 8 to build and run. Log4j 2.3 was the<br />
last release that supported Java 6 and Log4j 2.12.1 is the last release to support Java 7.</p>
<p>For complete information on Apache Log4j 2, including instructions on how to submit bug<br />
reports, patches, or suggestions for improvement, see the Apache Apache Log4j 2 website:</p>
<p><a href="https://logging.apache.org/log4j/2.x/">https://logging.apache.org/log4j/2.x/</a></p>