"ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-06 Thread Alain Désilets
I am trying to use log4j2 through log4j-1.2-api in the context of an uber-jar created with the maven shade plugin and am experiencing issues. I wrote a simple HelloWorld class that illustrates the issue. When I run this class through intelliJ, everything works fine. But when I run it through a te

Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-06 Thread Alain Désilets
Here is another interesting thing. If I remove the log4j-1.2-api dependency from the pom, then the when I try to build the project from Terminal, I get the following failure: [*ERROR*] */Users/desilets/Documents/GitRepositories/SpikeLog4j2Compatibility/src/main/java/org/examples/HelloWorld.java:

Re: "ERROR StatusLogger Reconfiguration failed" when running log4j-1.2-api from uber-jar

2022-07-06 Thread Ralph Goers
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 so