Replies: 2 comments 3 replies
-
One more thing i want to ask, is below change is fixing the issue that I mention here ? If yes then I will wait for that change. |
Beta Was this translation helpful? Give feedback.
-
TL;DR: See How do I create a single-JAR application containing Log4j Core? The Maven Shade Plugin creates a single-JAR application by copying all the files from the dependency JARs and putting them into a single JAR. Each time two or more JARs have a file with the same name, only one is kept and the other files are discarded. In order to deal with file name conflicts for each conflict you must configure an appropriate Resource Transformer to merge multiple files into one. The Log4j Plugin Cache Transformer is the appropriate resource transformer for In the next release I added a FAQ entry on how to create single-JAR applications. You can see a preview version on our staging site. Why did your application work with version In both situation your application was somehow crippled, but since the plugins in |
Beta Was this translation helpful? Give feedback.
-
Before I only use below "dependencies"
It doesn't show me "ERROR StatusLogger Unrecognized format specifier [d]"
After I update to "2.21.0", it start show me "ERROR StatusLogger Unrecognized format specifier [d]"
To fix this, I need to use plugin to merges Log4j2Plugins.dat plugin caches from all the jars containing Log4j 2.x Core components.
ref : https://logging.apache.org/log4j/transform/latest/#log4j-plugin-cache-transformer
I have already apply this solution on 2.21.0 to solve my problems.
The question is why I need to use plugin to fix this issue ? What is the change in 2.21.0 causing Log4j2Plugins.dat have problems ? Any solution for me not using that plugin ?
Beta Was this translation helpful? Give feedback.
All reactions