Apache Logging Services

Tuesday July 31, 2018

Log4j 2.11.1 released

The Apache Log4j 2 team is pleased to announce the Log4j 2.11.1 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.

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.

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.0 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:

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

into:

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

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

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

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.1 API, as well as many core components, maintains binary compatibility with previous releases.

GA Release 2.11.1

Changes in this version include:

Fixed Bugs

  • LOG4J2-2389: ThrowableProxy was saving and retrieving cache entries using different keys. Thanks to Liu Wen.
  • LOG4J2-2316: If root LoggerConfig does not have a Level return ERROR.
  • LOG4J2-2390: Fix broken links in log4j web documentation. Thanks to anton-balaniuc.
  • LOG4J2-2343: The OSGi Activator specified an incorrect version. Thanks to Raymond Augé.
  • LOG4J2-2305: Make java.util.ServiceLoader properly work in OSGi by using the Service Loader Mediator Specification. Thanks to Björn Kautler.
  • LOG4J2-2305: Split the SLF4J binding into 2 implementations - one for SLF4J 1.7.x and one for SLF4J 1.8+.
  • LOG4J2-2268: Improve plugin error message when elements are missing. Thanks to Tilman Hausherr.
  • LOG4J2-2283: ParserConfigurationException when using Log4j with oracle.xml.jaxp.JXDocumentBuilderFactory. Thanks to Vishnu Priya Matha.
  • LOG4J2-2300: PoolingDriverConnectionSource does not take into account properties, user name, and password.
  • LOG4J2-2307: MutableLogEvent and RingBufferLogEvent message mementos retain the original format string.
  • LOG4J2-2032: Curly braces in parameters are not treated as placeholders. Thanks to Kostiantyn Shchepanovskyi.
  • LOG4J2-2317: MutableLogEvent.getNonNullImmutableMessage and Log4jLogEvent.makeMessageImmutable retain format and parameters.
  • LOG4J2-2318: Messages are no longer mutated when the asynchronous queue is full. A warning is logged to the status logger instead.
  • LOG4J2-2320: Fix NPE in AbstractLogger when another exception is thrown, masking the root cause.
  • LOG4J2-2321: AsyncLogger uses the correct level when unspecified. This provides parity between AsyncLogger and Logger.
  • LOG4J2-2322: Custom ContextSelector implementations which select an AsyncLoggerContext disable LoggerConfig.includeLocation by default for parity with AsyncLoggerContextSelector.
  • LOG4J2-2269: MutableLogEvent references to other objects are cleared after each use. Fix a memory leak causing references to parameters to be held after synchronous logging with thread locals enabled.
  • LOG4J2-2301: Mixed async loggers no longer forget parameter values, providing some appenders with an array of nulls.
  • LOG4J2-2331: RollingFileManager debug logging avoids string concatenation and errant braces in favor of parameterized logging. Thanks to Mike Baranski.
  • LOG4J2-2333: Handle errors thrown in default disruptor ExceptionHandler implementations to avoid killing background threads.
  • LOG4J2-2334: Add API org.apache.logging.log4j.core.appender.AsyncAppender.getQueueSize().
  • LOG4J2-2336: Remove duplicate hyphen from the AsyncLoggerConfig background thread name.
  • LOG4J2-2347: Update Apache Commons Compress from 1.16.1 to 1.17.
  • LOG4J2-2352: RingBufferLogEvent memento messages provide the expected format string, and no longer attempt to substitute parameters into curly braces in parameter toString values. Both RingBufferLogEvent and MutableLogEvent memento implementations memoize results to avoid rebuilding formatted string values.
  • LOG4J2-2355: PropertiesUtil ignores non-string system properties. Fixes a NoClassDefFoundError initializing StatusLogger caused by an NPE while initializing the static PropertiesUtil field. Thanks to Henrik Brautaset Aronsen.
  • LOG4J2-2362: Fixed a memory leak in which ReusableObjectMessage would hold a reference to the most recently logged object.
  • LOG4J2-2312: Jackson layouts used with AsyncLoggerContextSelector output the expected format rather than only a JSON string of the message text.
  • LOG4J2-2364: Fixed a memory leak in which ReusableParameterizedMessage would hold a reference to the most recently logged throwable and provided varargs array.
  • LOG4J2-2368: Nested logging doesn't clobber AbstractStringLayout cached StringBuidlers
  • LOG4J2-2373: StringBuilders.escapeJson implementation runs in linear time. Escaping large JSON strings in EncodingPatternConverter and MapMessage will perform significantly better. Thanks to Kevin Meurer.
  • LOG4J2-2376: StringBuilders.escapeXml implementation runs in linear time. Escaping large XML strings in EncodingPatternConverter and MapMessage will perform significantly better. Thanks to Kevin Meurer.
  • LOG4J2-2377: NullPointerException in org.apache.logging.log4j.util.LoaderUtil.getClassLoaders() when using Bootstrap class loader. Thanks to Mirko Rzehak, Gary Gregory.
  • LOG4J2-2382: Update Mongodb 3 driver from 3.6.3 to 3.8.0.
  • LOG4J2-2388: Thread indefinitely blocked when logging a message in an interrupted thread. Thanks to Failled.

Changes

  • LOG4J2-1721: Allow composite configuration for context parameter. Thanks to Phokham Nonava.
  • LOG4J2-2302: Status logger should show the Log4j name and version when initializing itself.
  • LOG4J2-2304: Log4j2 2.8.2 JMX unregister NullPointerException. Thanks to wumengsheng.
  • LOG4J2-2311: Update Jackson from 2.9.4 to 2.9.5.
  • LOG4J2-2313: Update LMAX Disruptor from 3.3.7 to 3.4.2.
  • LOG4J2-548: Log4j 2.0 ERROR "Could not search jar" with JBoss EAP 6.2. Thanks to Shehata, Paresh Varke, Eric Victorson, Martin Laforet.
  • LOG4J2-2328: Update JAnsi from 1.17 to 1.17.1.
  • LOG4J2-2351: Added AbstractLogEvent.getMutableInstant to allow the MutableInstant instance to be modified by classes extending AbstractLogEvent.
  • LOG4J2-2357: Update Jackson from 2.9.5 to 2.9.6.
  • LOG4J2-2358: Update Kafka client from 1.0.0 to 1.1.0.
  • LOG4J2-2384: Update Kafka client from 1.1.0 to 1.1.1.
  • LOG4J2-2385: Update Groovy from 2.4.13 to 2.5.1.
  • LOG4J2-2386: Update optional Apache Commons DBCP from 2.2.0 to 2.4.0.

Apache Log4j 2.11.1 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:

http://logging.apache.org/log4j/2.x/

Comments:

Love to see it has JSONLayout. sometime I use https://jsonformatter.org for JSON validation.

Posted by hex color on August 01, 2018 at 07:55 AM UTC #

loved it, thanks for sharing.

Posted by Wells Fargo Routing Number Florida on August 05, 2018 at 06:22 PM UTC #

Through this survey, you can also tell about your dining experience. https://tellsurvey.xyz/www-talktoihop-com/

Posted by maworiz on November 10, 2018 at 07:59 PM UTC #

If you are forget our window10 password and you are not see the right way to go this website and you will see the more information for this website http://windowstuts.net/remember-passwords there are more user are try this website link and get the more interested information.

Posted by Akki12 on February 04, 2019 at 05:32 AM UTC #

Excellent and nice post. It will beneficial for everyone. Thanks for sharing such a wonderful post. Avail No 1 Dissertation writing help UK from certified PhD writers. It is extremely helpful for me. You can email us at info@ukdissertationhelp.co.uk or Phone Number - 020 8144 9988

Posted by Dissertation writing help on April 03, 2019 at 09:45 AM UTC #

This Log4j 2.11.1 release is something that you guys should be proud of. Congratulations! Btw, I am Jon of https://www.ihsbuyshouses.com

Posted by Jon on April 09, 2019 at 01:38 PM UTC #

very good release. i like it very much from info visit https://fdmr.icu

Posted by FDMR on May 26, 2019 at 07:15 AM UTC #

This is a nice service. I think it could have an implementation for online casinos that accept American Express at https://ipayzz.com/american-express/ and it can have some useful functions to make the customers' life easier.

Posted by daniellestewart on June 18, 2019 at 06:47 AM UTC #

I know what to do, thank you! Actually this Blog post helped me a lot. I hope you continue writing about this kind of entry. https://www.maidserviceoforlando.com/lakemary

Posted by casseverhart13 on June 19, 2019 at 06:15 AM UTC #

Mere Liye Ye post bahut hi kaam ka hai

Posted by Puran Mal on June 26, 2019 at 05:17 PM UTC #

thanks you for the nice post, i benefit a lot...

Posted by click here on June 28, 2019 at 07:58 AM UTC #

It's great to have the opportunity to read a good quality article with useful information on topics of interest. I agree with your conclusion. I am waiting for your future updates. https://templerun.co

Posted by vex on July 09, 2019 at 09:45 AM UTC #

Great work and presentation! AMAZING. LOVE.

Posted by meidenyfirs1982 on July 20, 2019 at 05:34 PM UTC #

Very cute...Thank you for sharing. taban del infinito socio

Posted by mototerme1974 on July 20, 2019 at 05:59 PM UTC #

Great work and presentation, really like 3D-models and colours! Beautifully fitting and retro.

Posted by aggerogonf1984 on July 20, 2019 at 06:28 PM UTC #

Have a great summer! 帅的~

Posted by geltsubmibec1986 on July 20, 2019 at 08:07 PM UTC #

@杜 晓晴 Thank you!) Amazing bro!

Posted by ducttheride1974 on July 20, 2019 at 11:43 PM UTC #

秀 哇,这个人打球好像CXK

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

Cool project! Check out my last project :) Beautiful work! like it + + +

Posted by imeplabu1989 on July 21, 2019 at 01:46 AM UTC #

So good, I am impressed. Like it very much. Love the presentation, nice work!

Posted by orabetme1970 on July 21, 2019 at 03:25 AM UTC #

omg!! i'm in love with it!! Much work has been done! Great work!

Posted by melakidi1982 on July 21, 2019 at 04:58 AM UTC #

Such Great Packaging!! Very nice illustrations!

Posted by tecaledgle1978 on July 21, 2019 at 05:30 AM UTC #

This is so colorful and creative. Nice work! muy bueno

Posted by acunocna1978 on July 21, 2019 at 06:44 AM UTC #

I like the elongated steeze. it is the best i ever saw, and i saw a lot,

Posted by diacidoda1978 on July 21, 2019 at 07:48 AM UTC #

@Skylark Communication Many thanks! Beautiful! and adorable characters, too!

Posted by liconscicha1983 on July 21, 2019 at 08:20 AM UTC #

Good! ✨ great work !!

Posted by stabdepchecy1989 on July 21, 2019 at 08:52 AM UTC #

Inspired by ……YOU 太厉害了,我可以分享您的作品到微博么?

Posted by faupifacti1987 on July 21, 2019 at 09:25 AM UTC #

Smile !Love!simple! Exceptional detail. And awesome colour schemes. Lovely...

Posted by axrasyscia1973 on July 21, 2019 at 09:59 AM UTC #

i like it but i am scared What a tour! Just looking at the photos made me feel that I was there. I enjoyed it.

Posted by tiodiotingdant1981 on July 21, 2019 at 10:31 AM UTC #

Amazing concept! Lost for words. So amazing!!!

Posted by biotrenexget1985 on July 21, 2019 at 11:05 AM UTC #

Update a mobile GPS: Depending on the brand and model you choose, you can access free updates. https://garminmapupdate.net/garmin-map-updates/ This is very important to check when you buy because the new cards can quickly represent a significant budget. The new maps can be integrated by connecting the GPS to the computer or by connecting the device to Wi-Fi, when the device has the option.

Posted by Johny gamer on August 01, 2019 at 10:48 PM UTC #

Great work and nice presentation! Thanks for sharing!

Posted by Sachin Prajapati on August 06, 2019 at 05:25 AM UTC #

I like this post very much, I will come back to your ब्लॉग, Thanks for sharing the post

Posted by Puran Mal on August 14, 2019 at 02:38 AM UTC #

Exceptional detail. And awesome general idea! Really cool!

Posted by india-tourist-places.com on August 15, 2019 at 11:40 AM UTC #

Nice Post. I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me. For instant support related to the Computer or Laptop Problem such as Data Recover & Virus Removal please visit https://www.sgeeksquad.com/ or Call Geek Squad Support Number for the best solution.

Posted by Millay Moede on September 02, 2019 at 08:06 AM UTC #

I had found that the information is very helpful.

Posted by Lucky's Electrician of Hunter's Creek on September 04, 2019 at 08:09 AM UTC #

You are Article very helpful thanks for you

Posted by Sonu on September 05, 2019 at 06:44 AM UTC #

nice!

Posted by latest iphone on September 05, 2019 at 08:27 AM UTC #

Oh I just love the way you simplified everything, I mean really cool stuff right there!http://www.newcastletreeservicepros.com.au/

Posted by arborist newcastle on September 05, 2019 at 08:28 AM UTC #

Apache Log4j is a Java-based logging utility. It was initially composed by Ceki Gülcü and is a piece of the Apache Logging Services venture of the Apache https://smbmarble.com/coffee-brown-marble/ Software Foundation. Log4j is one of a few Java logging systems.

Posted by Coffee Brown Marble on September 07, 2019 at 12:00 PM UTC #

This is very helpful for me. Thank you for this.

Posted by Akash on September 08, 2019 at 09:40 AM UTC #

looking great! really like your website and post you made for this project!!

Posted by birthdaywishes on September 22, 2019 at 11:08 AM UTC #

Nice release! https://www.wpressblog.com/wpengine-coupon-code/

Posted by David James on October 08, 2019 at 03:17 PM UTC #

Bulk SMS is growing at an unmatched pace for business communication even with the emergence of social media and instant messaging. Its effectiveness is still unmatched with SMS being the primary feature of all cell phones.

Posted by Bulk SMS on October 25, 2019 at 12:38 PM UTC #

Post a Comment:
  • HTML Syntax: NOT allowed

Calendar

Search

Hot Blogs (today's hits)

Tag Cloud

Categories

Feeds

Links

Navigation