////
    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-18-0]
== 2.18.0

Release date:: 2022-06-28

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 https://issues.apache.org/jira/browse/LOG4J2-2975[LOG4J2-2975] and https://jira.qos.ch/browse/SLF4J-511[SLF4J-511].

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

Apache Log4j 2.18.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 http://logging.apache.org/log4j/2.x/[the Apache Log4j 2 website].


=== Added

* Add support for Jakarta Mail API in the SMTP appender. (https://issues.apache.org/jira/browse/LOG4J2-3362[LOG4J2-3362])
* Add support for custom Log4j 1.x levels. (https://issues.apache.org/jira/browse/LOG4J2-3419[LOG4J2-3419])
* Add support for adding and retrieving appenders in Log4j 1.x bridge. (https://issues.apache.org/jira/browse/LOG4J2-3440[LOG4J2-3440])
* Add support for custom LMAX disruptor WaitStrategy configuration. (https://issues.apache.org/jira/browse/LOG4J2-3472[LOG4J2-3472])
* Add support for Apache Extras' RollingFileAppender in Log4j 1.x bridge. (https://issues.apache.org/jira/browse/LOG4J2-3483[LOG4J2-3483])
* Add MutableThreadContextMapFilter. (https://issues.apache.org/jira/browse/LOG4J2-3495[LOG4J2-3495])
* Add support for 24 colors in highlighting (https://issues.apache.org/jira/browse/LOG4J2-3538[LOG4J2-3538])

=== Changed

* Improves ServiceLoader support on servlet containers. (https://issues.apache.org/jira/browse/LOG4J2-3427[LOG4J2-3427])
* Make the default disruptor WaitStrategy used by Async Loggers garbage-free. (https://issues.apache.org/jira/browse/LOG4J2-3473[LOG4J2-3473])
* Do not throw UnsupportedOperationException when JUL ApiLogger::setLevel is called. (https://issues.apache.org/jira/browse/LOG4J2-3476[LOG4J2-3476])
* Support Spring 2.6.x. (https://issues.apache.org/jira/browse/LOG4J2-3506[LOG4J2-3506])
* Move perf tests to log4j-core-its (https://issues.apache.org/jira/browse/LOG4J2-3516[LOG4J2-3516])
* Upgrade the Flume Appender to Flume 1.10.0 (https://issues.apache.org/jira/browse/LOG4J2-3536[LOG4J2-3536])

=== Fixed

* Fix minor typo #792.
* Improve validation and reporting of configuration errors.
* Allow enterprise id to be an OID fragment. (https://issues.apache.org/jira/browse/LOG4J2-1376[LOG4J2-1376])
* Fix problem with non-uppercase custom levels. (https://issues.apache.org/jira/browse/LOG4J2-2872[LOG4J2-2872])
* Avoid ClassCastException in JeroMqManager with custom LoggerContextFactory #791. (https://issues.apache.org/jira/browse/LOG4J2-3040[LOG4J2-3040])
* DirectWriteRolloverStrategy should use the current time when creating files. (https://issues.apache.org/jira/browse/LOG4J2-3339[LOG4J2-3339])
* Fixes the syslog appender in Log4j 1.x bridge, when used with a custom layout. (https://issues.apache.org/jira/browse/LOG4J2-3359[LOG4J2-3359])
* log4j-1.2-api 2.17.2 throws NullPointerException while removing appender with name as null. (https://issues.apache.org/jira/browse/LOG4J2-3359[LOG4J2-3359])
* Improve JsonTemplateLayout performance. (https://issues.apache.org/jira/browse/LOG4J2-3393[LOG4J2-3393])
* Fix resolution of non-Log4j properties. (https://issues.apache.org/jira/browse/LOG4J2-3413[LOG4J2-3413])
* Fixes Spring Boot logging system registration in a multi-application environment. (https://issues.apache.org/jira/browse/LOG4J2-3418[LOG4J2-3418])
* JAR file containing Log4j configuration isn't closed. (https://issues.apache.org/jira/browse/LOG4J2-3423[LOG4J2-3423])
* Properties defined in configuration using a value attribute (as opposed to element) are read correctly. (https://issues.apache.org/jira/browse/LOG4J2-3424[LOG4J2-3424])
* Syslog appender lacks the SocketOptions setting. (https://issues.apache.org/jira/browse/LOG4J2-3425[LOG4J2-3425])
* Log4j 1.2 bridge should not wrap components unnecessarily. (https://issues.apache.org/jira/browse/LOG4J2-3426[LOG4J2-3426])
* Update 3rd party dependencies for 2.18.0. (https://issues.apache.org/jira/browse/LOG4J2-3428[LOG4J2-3428])
* SizeBasedTriggeringPolicy would fail to rename files properly when integer pattern contained a leading zero. (https://issues.apache.org/jira/browse/LOG4J2-3432[LOG4J2-3432])
* Fixes default SslConfiguration, when a custom keystore is used. (https://issues.apache.org/jira/browse/LOG4J2-3439[LOG4J2-3439])
* Fixes appender concurrency problems in Log4j 1.x bridge. (https://issues.apache.org/jira/browse/LOG4J2-3447[LOG4J2-3447])
* Fix and test for race condition in FileUtils.mkdir(). (https://issues.apache.org/jira/browse/LOG4J2-3452[LOG4J2-3452])
* LocalizedMessage logs misleading errors on the console. (https://issues.apache.org/jira/browse/LOG4J2-3458[LOG4J2-3458])
* Add missing message parameterization in RegexFilter. (https://issues.apache.org/jira/browse/LOG4J2-3475[LOG4J2-3475])
* Add the missing context stack to JsonLayout template. (https://issues.apache.org/jira/browse/LOG4J2-3477[LOG4J2-3477])
* HttpWatcher did not pass credentials when polling. (https://issues.apache.org/jira/browse/LOG4J2-3481[LOG4J2-3481])
* UrlConnectionFactory.createConnection now accepts an AuthorizationProvider as a parameter. (https://issues.apache.org/jira/browse/LOG4J2-3482[LOG4J2-3482])
* The DirectWriteRolloverStrategy was not detecting the correct index to use during startup. (https://issues.apache.org/jira/browse/LOG4J2-3490[LOG4J2-3490])
* Async Loggers were including the location information by default. (https://issues.apache.org/jira/browse/LOG4J2-3491[LOG4J2-3491])
* ClassArbiter's newBuilder method referenced the wrong class. (https://issues.apache.org/jira/browse/LOG4J2-3493[LOG4J2-3493])
* Don't use Paths.get() to avoid circular file systems. (https://issues.apache.org/jira/browse/LOG4J2-3527[LOG4J2-3527])
* Fix parsing error, when XInclude is disabled. (https://issues.apache.org/jira/browse/LOG4J2-3531[LOG4J2-3531])
* Fix LevelRangeFilterBuilder to align with log4j1's behavior. (https://issues.apache.org/jira/browse/LOG4J2-3534[LOG4J2-3534])
* Fixes problem with wrong ANSI escape code for bright colors (https://issues.apache.org/jira/browse/LOG4J2-3537[LOG4J2-3537])
* Log4j 1.2 bridge should generate Log4j 2.x messages based on the parameter runtime type.
