Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar
Alain Désilets <[email protected]> Thu, 7 Jul 2022 05:35:20 -0400
| Newsgroups | gmane.comp.jakarta.log4j.user |
|---|---|
| Message-ID | <CADhJcXMn1DJccc6cHhimQGL80P2R1X6Fmxe3xA3bAFDFqMrcGQ@mail.gmail.com> |
Le jeu. 7 juill. 2022, 2 h 54 a.m., Ralph Goers <[email protected]> a écrit : > When you run as an uber jar you are most likely breaking things. > > Log4j uses a file named Log4j2Plugins.dat to define its plugins. Every jar > that has Log4j plugins will have one. When you create an uber jar most > likely only one is left and it probably doesn’t contain the core Log4j > stuff. > > To solve this you need to use > https://github.com/edwgiz/maven-shaded-log4j-transformer. > > Ralph > Thx for the reply Ralph. If you look at my pom, you can see that there is a filter in the configuration of the shade plugin that remove the Log4j2Plugins.dat files. This seems to work because jar -tf iutools-core-1.0.2-jar-with-dependencies.jar | grep Log4j2Plugins produces an empty list. So I think the problem lies elsewhere. Alain