Apache Logging Services

Saturday March 17, 2018

Log4j 2.11 released

The Apache Log4j 2 team is pleased to announce the Log4j 2.11 release!

Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many other modern features such as support for Markers, lambda expressions for lazy logging, property substitution using Lookups, multiple patterns on a PatternLayout and asynchronous Loggers. Another notable Log4j 2 feature is the ability to be "garbage-free" (avoid allocating temporary objects) while logging. In addition, Log4j 2 will not lose events while reconfiguring.

This release contains new features, bugfixes and minor enhancements. One 2.11 feature worth highlighting is that log timestamps can now have microsecond or nanosecond precision when running on Java 9.

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.

As of Log4j 2.9.0, the Log4j API was modified to use java.util.ServiceLoader to locate Log4j implementations, although the former binding mechanism is still supported. The Log4j API jar is now a multi-release jar to provide implementations of Java 9 specific classes. Multi-release jars are not supported by the OSGi specification so OSGi modules will not be able to take advantage of these implementations but will not lose functionality as they will fall back to the implementations used in Java 7 and 8. More details on the new features and fixes are itemized below. Note that some tools are not compatible with multi-release jars and may fail trying to process class files in the META-INF/versions/9 folder. Those errors should be reported to the tool vendor.

Note that subsequent to the 2.9 release, for security reasons, SerializedLayout is deprecated and no longer used as default in the Socket and JMS appenders. SerializedLayout can still be used as before, but has to be specified explicitly. To retain old behaviour, you have to change configuration like:

  <Socket name="socket" host="localhost" port="9500"/>


  <Socket name="socket" host="localhost" port="9500">

We do, however, discourage the use of SerializedLayout and recommend JsonLayout as a replacement:

  <Socket name="socket" host="localhost" port="9500">
    <JsonLayout properties="true"/>

Note that subsequent to the 2.9 release, for security reasons, Log4j does not process DTD in XML files. If you used DTD for including snippets, you have to use XInclude or Composite Configuration instead.

The Log4j 2.11.0 API, as well as many core components, maintains binary compatibility with previous releases with the following exceptions to Log4j Core. Log4j 2.11.0 moves code from log4j-core to several new Maven modules. Dependencies to other jars that used to be optional in log4j-core are now required in the new modules. The code in these modules have been repackaged. These changes do not affect your configuration files.

The new modules are:


  • Group ID: org.apache.logging.log4j
  • Artifact ID: log4j-jdbc-dbc2
  • Old package: org.apache.logging.log4j.core.appender.db.jdbc
  • New package: org.apache.logging.log4j.jdbc.appender


  • Group ID: org.apache.logging.log4j
  • Artifact ID: log4j-jpa
  • Old package 1: org.apache.logging.log4j.core.appender.db.jpa
  • New package 1: org.apache.logging.log4j.jpa.appender
  • Old package 2: org.apache.logging.log4j.core.appender.db.jpa.converter
  • New package 2: org.apache.logging.log4j.jpa.converter


  • Group ID: org.apache.logging.log4j
  • Artifact ID: log4j-mongodb2
  • Old package: org.apache.logging.log4j.mongodb
  • New package: org.apache.logging.log4j.mongodb2


  • Group ID: org.apache.logging.log4j
  • Artifact ID: log4j-mongodb3
  • Old package: org.apache.logging.log4j.mongodb
  • New package: org.apache.logging.log4j.mongodb3

GA Release 2.11.0

Changes in this version include:

New Features

  • LOG4J2-2253: Add API to enable iterating over message parameters without creating temporary objects. Thanks to Carter Kozak.
  • LOG4J2-1883: Added support for precise (micro and nanosecond) timestamps when running on Java 9. A limited number of precise %d date formats are supported with PatternLayout. POTENTIAL BREAKING CHANGE: The XML, JSON and YAML formats have changed: they no longer have the "timeMillis" attribute and instead have an "Instant" element with "epochSecond" and "nanoOfSecond" attributes. Thanks to Anthony Maire.
  • LOG4J2-2190: Output JSON object for ObjectMessage in JsonLayout. Thanks to Franz Wong.
  • LOG4J2-2191: Made log4j-core a multi-release ("multi-version") jar, added log4j-core-java9 module.
  • LOG4J2-2143: Add missing converters to PatternLayout.
  • LOG4J2-2160: Add API org.apache.logging.log4j.core.lookup.Interpolator.getStrLookupMap().
  • LOG4J2-2179: The MongoDB Appender should use a keys and values for a Log4j MapMessage.
  • LOG4J2-2180: Add a MongoDbProvider builder for and deprecate org.apache.logging.log4j.mongodb.MongoDbProvider.createNoSqlProvider().
  • LOG4J2-2181: The JDBC Appender should use keys and values from a Log4j MapMessage.
  • LOG4J2-2185: Add a simple JDBC DriverManager-based ConnectionSource that uses JDBC's DriverManager#getConnection(String, String, String).
  • LOG4J2-2186: Add a JDBC ConnectionSource that provides pooling through Apache Commons DBCP 2.
  • LOG4J2-2187: Add a hook for a Connection Source for a JDBC Appender to release its resources.
  • LOG4J2-2203: Add org.apache.logging.log4j.core.util.WatchManager#unwatch(File).
  • LOG4J2-2206: Add method org.apache.logging.log4j.core.util.WatchManager.reset(File) and reset().
  • LOG4J2-2208: Add debug logging to org.apache.logging.log4j.mongodb.MongoDbConnection.

Fixed Bugs

  • LOG4J2-2271: Move module-info.class to META-INF/versions/9 directory.
  • LOG4J2-2254: Incorrect automatics module name header was being included in manifests.
  • LOG4J2-2247: NullPointerException would occur when header was provided to a Layout on RollingRandingAccessFileAppender with DirectWriteRolloverStrategy.
  • LOG4J2-2129: Log4j2 throws NoClassDefFoundError in Java 9 in java.util.ServiceLoader. Thanks to Blazej Bucko.
  • LOG4J2-2158: Fixed bug where ThreadContext map was cleared, resulting in entries being only available for one log event. Thanks to Björn Kautler.
  • LOG4J2-2002: Avoid null attribute values in DefaultConfigurationBuilder. Thanks to Paul Burrowes.
  • LOG4J2-2175: Fix typo in Property Substitution docs. Thanks to Behrang Saeedzadeh.
  • LOG4J2-2163: Allow SortedArrayStringMap to be filtered upon deserialization. Fix build error in Java 9 when compiling log4j-core test classes.
  • LOG4J2-2157: Don't create exit message in traceExit(R) when logging is disabled. Thanks to Malte Skoruppa.
  • LOG4J2-2123: DefaultMergeStrategy did not merge filters on loggers correctly. Thanks to Jacob Tolar.
  • LOG4J2-2126: Removed compile-time dependency on Java Management APIs from Log4J API module to improve compatibility with Android Platform which does not support JMX extensions. Thanks to Oleg Kalnichevski.
  • LOG4J2-2270: Strings::join, when called with [null] returns "null" instead of EMPTY. Thanks to Cyril Martin.
  • LOG4J2-2276: ConcurrentModificationException from org.apache.logging.log4j.status.StatusLogger.(StatusLogger.java:71). Thanks to Sean Baxter.
  • LOG4J2-2274: Allow EnvironmentPropertySource to run with a SecurityManager that rejects environment variable access. Thanks to Sebastien Lannez.
  • LOG4J2-2279: Allow SystemPropertiesPropertySource to run with a SecurityManager that rejects system property access. Thanks to Gary Gregory.


  • LOG4J2-2273: Documentation fix in manual page for custom configurations. Thanks to Bruno P. Kinoshita.
  • LOG4J2-2252: Reusable LogEvents now pass the original format string to downstream components like layouts and filters. Thanks to Carter Kozak.
  • LOG4J2-2250: The internal status logger timestamp format is now configurable with system property log4j2.StatusLogger.DateFormat.
  • LOG4J2-2236: Removed unnecessary dependency on jcommander since Log4j uses embedded picocli since 2.9.
  • LOG4J2-2146: Update version of maven bundle plugin to 3.4.0. Convert bundle plugin error to a warning.
  • LOG4J2-2215: Reduce compiler warnings in log4j-api.
  • LOG4J2-2127: Removed unnecessary threadlocal StringBuilder field from MdcPatternConverter. Thanks to Carter Kozak.
  • LOG4J2-2194: Require Java 9 to compile the log4j-perf module to allow benchmarking with Java 9 APIs.
  • LOG4J2-2193: Update JMH to version 1.19 from 1.1.1.
  • LOG4J2-2132: Update ZeroMQ's jeromq from 0.4.2 to 0.4.3.
  • LOG4J2-2165: Update Jackson from 2.9.2 to 2.9.3.
  • LOG4J2-2184: Update MongoDB driver from 3.0.4 to 3.6.1.
  • LOG4J2-2197: Document default property value support. Thanks to Fabrice Daugan.
  • LOG4J2-2198: Update MongoDB dependencies from classic to modern.
  • LOG4J2-2204: org.apache.logging.log4j.core.util.WatchManager.getWatchers() should pre-allocate its new Map.
  • LOG4J2-2209: Rename existing MongoDb plugin and related artifacts from MongoDb to MongoDb2.
  • LOG4J2-2210: Fix error log message for Script which says ScriptFile instead. Thanks to Björn Kautler.
  • LOG4J2-2212: Unnecessary contention in CopyOnWriteSortedArrayThreadContextMap. Thanks to Daniel Feist, Gary Gregory.
  • LOG4J2-2213: Unnecessary contention in GarbageFreeSortedArrayThreadContextMap. Thanks to Daniel Feist, Gary Gregory.
  • LOG4J2-2214: Unnecessary contention in DefaultThreadContextMap. Thanks to Daniel Feist, Gary Gregory.
  • LOG4J2-2182: NullPointerException at org.apache.logging.log4j.util.Activator.loadProvider(Activator.java:81) in log4j 2.10.0. Thanks to liwenxian2017, Gary Gregory.
  • LOG4J2-2202: MarkerFilter onMismatch invalid attribute in .properties. Thanks to Kilian, Gary Gregory.
  • LOG4J2-2219: Configuration builder classes should look for "onMismatch", not "onMisMatch". Thanks to Kilian, Gary Gregory.
  • LOG4J2-2205: New module log4j-mongodb3: Remove use of deprecated MongoDB APIs and code to the Java driver version 3 API. Thanks to Gary Gregory.
  • LOG4J2-2188: Split off JPA support into a new module log4j-jpa. Thanks to Gary Gregory.
  • LOG4J2-2229: Update Jackson from 2.9.3 to 2.9.4. Thanks to Gary Gregory.
  • LOG4J2-2243: Cannot see or copy all of certain JAnsi exception messages on Windows due to NUL characters. Thanks to Gary Gregory.
  • LOG4J2-2245: Update Apache Commons Compress from 1.15 to 1.16.1. Thanks to Gary Gregory.
  • LOG4J2-2259: Update MongoDB 3 module from driver 3.6.1 to 3.6.3.
  • LOG4J2-2260: [SMTP] Update javax.mail from 1.6.0 to 1.6.1.
  • LOG4J2-2264: Update JAnsi from 1.16 to 1.17.

Apache Log4j 2.11.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 the Apache Apache Log4j 2 website:



thank you very much for sharing great articles here.keep going with more interesting posts here.

Posted by vidmate app on April 01, 2018 at 06:12 AM UTC #

Found Interesting and wonderfull keep sharing

Posted by my website on May 05, 2018 at 05:22 AM UTC #

Thank you for sharing such an informative article - really has helped out my company a lot. https://www.kwikflow.com

Posted by Terry on June 24, 2018 at 06:25 PM UTC #

And also it is a very painful process to pay your ticket offline. It’s a long time eating process for a simple thing https://njmcdirectt.club/

Posted by maworiz on November 10, 2018 at 08:04 PM UTC #

Thanks for this very useful blogs, now I know how to fix this bugs. https://games.lol/android/

Posted by Necky on November 26, 2018 at 11:38 AM UTC #

i had some bugs on my server, but thankfully now everything is fixed with help of this blog. You can check my blog here: http://igviewers.com

Posted by max on January 18, 2019 at 07:47 PM UTC #

useful post thanks Thank you for your

Posted by عسل چت on January 30, 2019 at 11:07 PM UTC #

Thank you for your awesome site admi

Posted by ناز چت on January 30, 2019 at 11:08 PM UTC #

useful post thanks Thank you for your awesome site adminuseful post thanks Thank you for your awesome site admin

Posted by ققنوس چت on January 30, 2019 at 11:09 PM UTC #


Posted by smartphone pliable on February 11, 2019 at 08:18 PM UTC #

thank you

Posted by achat smartphone pliable Royole on February 15, 2019 at 08:16 PM UTC #

Great Article… Here you can get latest IT Certification Exams Study Material. We provide you real exam questions, dumps, braindumps, along with an updated vce test software. We assure you will pass your exam in first attempt. 100% passing guarantee https://www.killerdumps.com

Posted by KillerDumps on February 18, 2019 at 11:13 AM UTC #

ghanks for sharring this article

Posted by téléphone pliable on March 10, 2019 at 06:56 PM UTC #


Posted by ACHAT SMARTPHONE ROYOLE on March 20, 2019 at 09:20 PM UTC #

post thanks Thank you for your awesome site admin http://www.rocketseo.ir/

Posted by دانلود اهنگ باکویی on March 28, 2019 at 01:15 AM UTC #


Posted by explosederire.com on April 18, 2019 at 10:57 AM UTC #

Watch your favorite live sports, news, entertainment, and more. Plus, get unlimited access to the entire Hulu streaming library To activate Hulu code go to url if you need help to activate Hulu

Posted by www.hulu.com/activate on April 19, 2019 at 01:45 PM UTC #

Hulu provides the simplest way to stream entertainment to your TV. On your terms. With thousands of available channels. We provide information regarding Hulu Activation Code. Go to www.hulu.com/activate, and enter the Activation Code

Posted by www.hulu.com/activate on April 19, 2019 at 01:47 PM UTC #


Posted by lechateauguillestre.com on April 23, 2019 at 06:35 PM UTC #

riri, thanks

Posted by lechateauguillestre.com on April 27, 2019 at 07:17 PM UTC #

Hulu allows you to stream many movies and shows on your device. For hulu.com/activate, just enter the activation code and link it with your device.

Posted by hulu.com/activate on June 05, 2019 at 11:05 AM UTC #

Nice code, I am sure that everyone appreciates you sharing it. http://rnrrefinish.com.au/bumperrepairs/

Posted by Tim on June 12, 2019 at 06:03 AM UTC #

I think this blog is very useful.....A lot of information can be obtained through this blog.....Kudos to the team

Posted by Filmon Roku on June 19, 2019 at 06:31 AM UTC #

thanks for this good blog

Posted by بهینه سازی چت روم on June 28, 2019 at 11:01 PM UTC #

I would like to hear more information from your side.

Posted by click here on July 17, 2019 at 11:12 AM UTC #

this is master! Lovethis

Posted by lamogacy1974 on July 20, 2019 at 05:31 PM UTC #

Cool idea, really original! Wild

Posted by kezujossupp1986 on July 20, 2019 at 05:50 PM UTC #

Woooooow amazing work.. loved :) чистый кайф

Posted by nessrestemptoc1972 on July 20, 2019 at 07:46 PM UTC #

Das Philosophische in den Bildern ist sehr gut! Looooooove the style!

Posted by watcaehalli1979 on July 20, 2019 at 11:30 PM UTC #

Your works look very professional! I think we have a lot to learn from each other. Amazing work, I love it, perfect in every detail :)

Posted by outekhalri1974 on July 21, 2019 at 12:21 AM UTC #


Posted by emormecon1973 on July 21, 2019 at 01:20 AM UTC #

WOW ! Good work! I love it so impress like your work hope to see more in the future!! thumbs up

Posted by descdohira1975 on July 21, 2019 at 03:00 AM UTC #

great!!! Great presentation!

Posted by confcessmondswam1989 on July 21, 2019 at 04:49 AM UTC #

wow! thank you so much, @Mat Voyce ;-) WOW!! Awesome work (Y)

Posted by masbougahan1970 on July 21, 2019 at 05:22 AM UTC #

Wow,that is so cute,I like it! Very nice, but you wrote "Lius" Suarez in your description ;-)

Posted by conslentheteg1982 on July 21, 2019 at 06:35 AM UTC #

Really nice man! Love it love it !

Posted by risutanpho1976 on July 21, 2019 at 07:08 AM UTC #

Amazing. Just... it's so beautiful Wowww project! very much like it. Well done.

Posted by erapunyt1986 on July 21, 2019 at 07:40 AM UTC #

So great work and attractive presentation! Bravo! @Olga Pulvirenti And Thank you for watching and your great feedback, lovely to hear!

Posted by tamminsfestfal1989 on July 21, 2019 at 08:12 AM UTC #

领航员号! Thanks a lot @Kevin Salazar Yaranga @Oskar Jan @Gelo CS @Tom Leighton @Olivia Dai

Posted by genzevimu1978 on July 21, 2019 at 08:44 AM UTC #

hey Charis, great new series - and I believe that Pafos soccer club will double their instagram following - due to your images :-) but ... you know that a soccer goal is 11 meters broad in reality ?? The concept is WOW!

Posted by tigingawab1983 on July 21, 2019 at 09:18 AM UTC #

Thanks so much everybody!! Nice Work!!

Posted by renthicknicdy1981 on July 21, 2019 at 10:23 AM UTC #

love that gold foil effect! GOOD WORK

Posted by nancamebirth1981 on July 21, 2019 at 10:56 AM UTC #

Here’s hoping there’s a a ton more top-notch supplies coming!

Posted by power washing on July 31, 2019 at 08:55 AM UTC #

Loved the topic you presented it..Thanks

Posted by Viasat Internet Service on August 01, 2019 at 04:22 AM UTC #

Thanks for sharing! https://www.krygerglass.com/locations/missouri/springfield/2153-s-glenstone/

Posted by Michael on August 17, 2019 at 07:03 PM UTC #

I just understand more about it by reading this post! https://bettafish.top/

Posted by Betta2english on August 19, 2019 at 05:00 PM UTC #

Watch your favorite live sports, news, entertainment, and more. Plus, get unlimited access to the entire Hulu streaming library To activate Hulu code go to url hulu.com/activate if you need help to activate Hulu https://hulucomactivate.com/

Posted by www.hulu.com/activate on August 27, 2019 at 01:33 AM UTC #

This one isn't recommended for those with sensitive skin or heat discomfort while trying to sleep. By placing a rougher textured sheet beneath your fitted one, you can increase the friction, inhibiting movement and forcing your sheet to stop fussing around at night. regards https://sweetzzzmattress.com/blog/how-to-keep-sheets-on-bed/

Posted by sweet zzz on August 28, 2019 at 07:57 AM UTC #

nice post. regarsd https://topnaturalmattresses.com/latex-for-less-mattress-reviews/

Posted by Sara Taylor on August 30, 2019 at 02:59 PM UTC #

nice post https://sweetzzzmattress.com/blog/10-reasons-why-youre-having-nightmares-and-how-to-prevent-them-/

Posted by sweet zzz on September 01, 2019 at 12:53 PM UTC #

If you're getting the "confirm form resubmission" dialog popup, it typically occurs on Chrome on refresh or after pressing a back button. Regards - https://techtade.com/imessage-for-pc/

Posted by confirm form resubmission on September 01, 2019 at 03:24 PM UTC #

nice post. regards https://topnaturalmattresses.com/best-mattress-for-hot-sleepers/

Posted by sara taylor on September 04, 2019 at 08:34 AM UTC #

hey website is nice. Nice post. thanks for sharing it with us. thanks for sharing this information with us.

Posted by robin on September 09, 2019 at 12:00 PM UTC #

i like your blg and its speed nice

Posted by Todaypk on September 13, 2019 at 07:19 AM UTC #

i really lik your blog thanks https://www.moralhindistory.com/todaypk-download-watc-online-movies/

Posted by todaypk on September 13, 2019 at 07:23 AM UTC #

Post a Comment:
  • HTML Syntax: NOT allowed



Hot Blogs (today's hits)

Tag Cloud