How to migrate from Log4j 1.x to 2.x

Solution Verified - Updated -

Issue

  • I have application that is being written using log4j2, to take advantage of some of its new features. One of the
    libraries it uses is a bit older and was built with log4j 1.x. I'm having a problem where the new code in the
    application writes to the log, but the code in the old library does not write to the log. I even have one class
    which is a subclass of something in the old library and is also called by code in the old library, and this code
    also will not write to the log. I have configured the application to use log4j2 .

  • How can I get the code in the old library logging into the same file as my new code?

Environment

  • Red Hat JBoss Enterprise Application Platform (JBoss EAP)
    • 7.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content