////
    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.
////

////
    ██     ██  █████  ██████  ███    ██ ██ ███    ██  ██████  ██
    ██     ██ ██   ██ ██   ██ ████   ██ ██ ████   ██ ██       ██
    ██  █  ██ ███████ ██████  ██ ██  ██ ██ ██ ██  ██ ██   ███ ██
    ██ ███ ██ ██   ██ ██   ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
     ███ ███  ██   ██ ██   ██ ██   ████ ██ ██   ████  ██████  ██

    IF THIS FILE DOESN'T HAVE A `.ftl` SUFFIX, IT IS AUTO-GENERATED, DO NOT EDIT IT!

    Version-specific release notes (`7.8.0.adoc`, etc.) are generated from `src/changelog/*/.release-notes.adoc.ftl`.
    Auto-generation happens during `generate-sources` phase of Maven.
    Hence, you must always

    1. Find and edit the associated `.release-notes.adoc.ftl`
    2. Run `./mvnw generate-sources`
    3. Commit both `.release-notes.adoc.ftl` and the generated `7.8.0.adoc`
////

[#release-notes-2-12-0]
== 2.12.0

Release date:: 2019-06-23

This release contains bugfixes 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.

New features include support for reconfiguration of Log4j configuraton files accessed via HTTP(s) and Spring Cloud Config specifically, a new Docker Lookup for obtaining information about the current Docker container, new reconfiguration methods added to the Configurator class, the ability to pad integers with leading zeros in filenames generated by the rolling file appenders, and allowing the TCP `SocketAppender` to connect to multiple IP addresses when they are returned from DNS.

More details on the new features and fixes are itemized below.

Note that the XML, JSON and YAML formats changed in the 2.11.0 release: they no longer have the `timeMillis` attribute and instead have an `Instant` element with `epochSecond` and `nanoOfSecond` attributes.

The Log4j 2.12.0 API, as well as many core components, maintains binary compatibility with previous releases.

Log4j 2.12.0 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-12-0-added]
=== Added

* Allow custom end-of-line with JsonLayout. (https://issues.apache.org/jira/browse/LOG4J2-2337[LOG4J2-2337])
* Allow zero padding the counter of a RollingFileAppender. (https://issues.apache.org/jira/browse/LOG4J2-2403[LOG4J2-2403])
* Add reconfiguration methods to Configurator. (https://issues.apache.org/jira/browse/LOG4J2-2406[LOG4J2-2406])
* Add filter that will match events when no marker is present. (https://issues.apache.org/jira/browse/LOG4J2-2427[LOG4J2-2427])
* TCP Appender should support a host name resolving to multiple IP addresses. (https://issues.apache.org/jira/browse/LOG4J2-2586[LOG4J2-2586])
* GZIP compression on rollover supports configurable compression levels. (https://issues.apache.org/jira/browse/LOG4J2-2598[LOG4J2-2598])
* AsyncQueueFullPolicy configuration short values "Default" and "Discard" are case-insensitive to avoid confusion. (https://issues.apache.org/jira/browse/LOG4J2-2611[LOG4J2-2611])
* Add and use method org.apache.logging.log4j.message.MapMessage.toKey(String) for simpler subclasses. (https://issues.apache.org/jira/browse/LOG4J2-2634[LOG4J2-2634])
* Add support for reconfiguration via HTTP(S), Docker, and Spring Cloud Configuration. (https://issues.apache.org/jira/browse/LOG4J2-913[LOG4J2-913])

[#release-notes-2-12-0-changed]
=== Changed

* Update Jackson from 2.9.7 to 2.9.8. (https://issues.apache.org/jira/browse/LOG4J2-2570[LOG4J2-2570])
* Update MongoDB 3 module driver from 3.9.0 to 3.10.1. (https://issues.apache.org/jira/browse/LOG4J2-2574[LOG4J2-2574])
* Update Jackson from 2.9.8 to 2.9.9. (https://issues.apache.org/jira/browse/LOG4J2-2619[LOG4J2-2619])
* Refactor several AsyncLogger methods below the 35 byte threshold for inlining. (https://issues.apache.org/jira/browse/LOG4J2-2634[LOG4J2-2634])
* Update tests from H2 1.4.197 to 1.4.199.

[#release-notes-2-12-0-fixed]
=== Fixed

* FailoverAppender was failing with ERROR appender Failover has no parameter that matches element Failovers. (https://issues.apache.org/jira/browse/LOG4J2-1103[LOG4J2-1103])
* Lookups were not found if the plugin key was not lower case. (https://issues.apache.org/jira/browse/LOG4J2-1143[LOG4J2-1143])
* Locate plugins within a Jar using a URL Connection. (https://issues.apache.org/jira/browse/LOG4J2-1852[LOG4J2-1852])
* RollingRandomAccessFileAppender error message referenced incorrect class name. (https://issues.apache.org/jira/browse/LOG4J2-2547[LOG4J2-2547])
* NullPointerException in JdbcAppender.createAppender(). (https://issues.apache.org/jira/browse/LOG4J2-2559[LOG4J2-2559])
* JEP223 version detection fix for JDK 9 and up. (https://issues.apache.org/jira/browse/LOG4J2-2561[LOG4J2-2561])
* MapPatternConverter is properly created from the '%K', '%map', and '%MAP' patterns. PatternConverter instanceOf methods with unknown parameter types no longer elide those with known parameters. (https://issues.apache.org/jira/browse/LOG4J2-2564[LOG4J2-2564])
* StackOverflowException when server not reachable with SocketAppender. (https://issues.apache.org/jira/browse/LOG4J2-2592[LOG4J2-2592])
* Throw better exception message when both log4j-slf4j-impl and log4j-to-slf4j are present. (https://issues.apache.org/jira/browse/LOG4J2-2597[LOG4J2-2597])
* java.lang.StackOverflowError at org.apache.logging.log4j.junit.AbstractExternalFileCleaner.println(AbstractExternalFileCleaner.java:169). (https://issues.apache.org/jira/browse/LOG4J2-2598[LOG4J2-2598])
* Update file time when size based triggering policy is used without a time-based triggering policy. (https://issues.apache.org/jira/browse/LOG4J2-2602[LOG4J2-2602])
* Asynchronous logging when the queue is full no longer results in heavy CPU utilization and low throughput. (https://issues.apache.org/jira/browse/LOG4J2-2606[LOG4J2-2606])
* Explicitly set file creation time. (https://issues.apache.org/jira/browse/LOG4J2-2610[LOG4J2-2610])
* NullPointerException at org.apache.logging.log4j.core.appender.db.jdbc.JdbcDatabaseManager.writeInternal(JdbcDatabaseManager.java:803). (https://issues.apache.org/jira/browse/LOG4J2-2612[LOG4J2-2612])
* Restore constructor to ThrowablePatternConverter that was removed in 2.8.2. (https://issues.apache.org/jira/browse/LOG4J2-2616[LOG4J2-2616])
* Possible ClassCastException in org.apache.logging.log4j.core.script.ScriptManager.ScriptManager(Configuration, WatchManager) (https://issues.apache.org/jira/browse/LOG4J2-2618[LOG4J2-2618])
* StructuredDataId was ignoring maxLength attribute. (https://issues.apache.org/jira/browse/LOG4J2-2622[LOG4J2-2622])
* Fix a race allowing events not to be recorded when a RoutingAppender purge policy attempts to delete an idle appender at exactly the same time as a new event is recorded. (https://issues.apache.org/jira/browse/LOG4J2-2629[LOG4J2-2629])
* RoutingAppender PurgePolicy implementations no longer stop appenders referenced from the logger configuration, only those that have been created by the RoutingAppender. Note that RoutingAppender.getAppenders no longer includes entries for referenced appenders, only those which it has created. (https://issues.apache.org/jira/browse/LOG4J2-2631[LOG4J2-2631])
* RFC5424Layout was not properly setting default Structured Element id for the MDC (https://issues.apache.org/jira/browse/LOG4J2-2636[LOG4J2-2636])
