////
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

         https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
////

= 2.6.2 (2016-07-05)

This is the twelfth GA release.
It is primarily a bugfix release.
More details on the fixes are itemized below.

Note that subsequent to the 2.6 release a minor source incompatibility was found due to the addition of new methods to the `Logger` interface.
If you have code that does:

[source,java]
----
logger.error(null, “This is the log message”, throwable);
----

or similar with any log level you will get a compiler error saying the reference is ambiguous.
To correct this either do:

[source,java]
----
logger.error(“This is the log message”, throwable);
----

or

[source,java]
----
logger.error((Marker) null, “This is the log message”, throwable);
----

Log4j 2.6.2 maintains binary compatibility with previous releases.

Log4j 2.6.2 requires a minimum of Java 7 to build and run.
Log4j 2.3 was the last release that supported Java 6.

Basic compatibility with Log4j 1.x is provided through the `log4j-1.2-api` component, however it does
not implement some of the very implementation specific classes and methods.
The package names and Maven `groupId` have been changed to `org.apache.logging.log4j` to avoid any conflicts with Log4j 1.x.

For complete information on Apache Log4j 2, including instructions on how to submit bug reports, patches, or suggestions for improvement, see http://logging.apache.org/log4j/2.x/[the Apache Log4j 2 website].


[#release-notes-2-6-2-added]
=== Added

* Add "direct" option to ConsoleAppender for increased performance. (https://issues.apache.org/jira/browse/LOG4J2-1395[LOG4J2-1395])
* Unbox utility's ringbuffer of StringBuilders is now configurable. (https://issues.apache.org/jira/browse/LOG4J2-1412[LOG4J2-1412])
* (GC) ParameterFormatter now avoids calling toString() on auto-boxed primitive message parameters. (https://issues.apache.org/jira/browse/LOG4J2-1415[LOG4J2-1415])
* (GC) ObjectMessage and ReusableObjectMessage now avoid calling toString() on auto-boxed primitive parameters. (https://issues.apache.org/jira/browse/LOG4J2-1437[LOG4J2-1437])

[#release-notes-2-6-2-changed]
=== Changed

* Update Jackson from 2.7.4 to 2.7.5. (https://issues.apache.org/jira/browse/LOG4J2-1432[LOG4J2-1432])
* Update Jansi from 1.11 to 1.13. (https://issues.apache.org/jira/browse/LOG4J2-1433[LOG4J2-1433])
* Update Apache Commons Compress from 1.11 to 1.12. (https://issues.apache.org/jira/browse/LOG4J2-1444[LOG4J2-1444])

[#release-notes-2-6-2-fixed]
=== Fixed

* CronTriggeringPolicy was not properly setting the prevFileTime value for the PatternProcessor so file dates and times on rolled files were incorrect. (https://issues.apache.org/jira/browse/LOG4J2-1250[LOG4J2-1250])
* Fixed minor issues with the 2.6.1 website. (https://issues.apache.org/jira/browse/LOG4J2-1414[LOG4J2-1414])
* Fixed issue where Unbox utility ignored the value Constants.ENABLE_THREADLOCALS and always stored non-JDK classes in ThreadLocals. (https://issues.apache.org/jira/browse/LOG4J2-1417[LOG4J2-1417])
* Provide MessageFactory2 to custom Logger implementations. (https://issues.apache.org/jira/browse/LOG4J2-1418[LOG4J2-1418])
* RollingRandomAccessFileManager was not properly rolling over on startup and was getting a NullPointerException. (https://issues.apache.org/jira/browse/LOG4J2-1420[LOG4J2-1420])
* Fixed issue where AsyncAppenderQueueFullPolicyTest sometimes hangs. (https://issues.apache.org/jira/browse/LOG4J2-1422[LOG4J2-1422])
* Ensure that the thread-local StringBuilders used by Layouts to format log events to text will not retain excessive memory after a large message was logged. (https://issues.apache.org/jira/browse/LOG4J2-1434[LOG4J2-1434])
* Fix bug in OnStartupTriggeringPolicy that allowed it to roll over on every reconfiguration. Added minSize attribute. (https://issues.apache.org/jira/browse/LOG4J2-1440[LOG4J2-1440])
* OnStartupTriggeringPolicyTest fails on Windows saying the file is used by another process. (https://issues.apache.org/jira/browse/LOG4J2-1445[LOG4J2-1445])
* Fixed issue where reusable messages broke flow tracing logic. (https://issues.apache.org/jira/browse/LOG4J2-1452[LOG4J2-1452])
* If copy and delete fails in rename action then resort to truncating the source file after copying it. (https://issues.apache.org/jira/browse/LOG4J2-904[LOG4J2-904])
