You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "Markos, Alazar A" <al...@delta.com.INVALID> on 2022/03/02 17:08:05 UTC
WAR class loader policy affecting Log4j2 migration
When working with an application which has multiple jars/packages, logging stops after upgrading to Log4j 2.17.1. Only the main package where the app is initialized is logging. To resolve this, we had to go into the deployed jar in websphere and change WAR class loader policy to single class loader for application. After making this change, all the logs can be seen for all the jars. Is there a workaround for this issue besides the solution listed above?
Alazar Markos
Associate IT Developer
678 614 0234
alazar.markos@delta.com<ma...@delta.com>
[cid:image001.jpg@01D82E24.8D914D80]
Re: WAR class loader policy affecting Log4j2 migration
Posted by Ralph Goers <ra...@dslextreme.com>.
I don’t really know what “the solution listed above” is. I don’t see anything in my email.
I thought I responded to this that your app has multiple LoggerContexts. This is by design. It seems only one of them has a log4j2.xml configured so the others are most likely using the default configuration and logging errors to stdout. If you only want a single LoggerContext then you need to use a different ContextSelector.
Ralph
> On Mar 2, 2022, at 10:08 AM, Markos, Alazar A <al...@delta.com.INVALID> wrote:
>
> When working with an application which has multiple jars/packages, logging stops after upgrading to Log4j 2.17.1. Only the main package where the app is initialized is logging. To resolve this, we had to go into the deployed jar in websphere and change WAR class loader policy to single class loader for application. After making this change, all the logs can be seen for all the jars. Is there a workaround for this issue besides the solution listed above?
>
> Alazar Markos
> Associate IT Developer
> 678 614 0234
> alazar.markos@delta.com <ma...@delta.com>
Re: WAR class loader policy affecting Log4j2 migration
Posted by Gary Gregory <ga...@gmail.com>.
What happens if you update to 2.17.2?
Gary
On Wed, Mar 2, 2022, 14:26 Markos, Alazar A <al...@delta.com.invalid>
wrote:
> When working with an application which has multiple jars/packages, logging
> stops after upgrading to Log4j 2.17.1. Only the main package where the app
> is initialized is logging. To resolve this, we had to go into the deployed
> jar in websphere and change WAR class loader policy to single class loader
> for application. After making this change, all the logs can be seen for all
> the jars. Is there a workaround for this issue besides the solution listed
> above?
>
>
>
> Alazar Markos
>
> Associate IT Developer
>
> 678 614 0234
>
> alazar.markos@delta.com
>
>
>