Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.7
-
None
-
None
Description
Servlet 3.1 application built with maven with log4j2.xml in src/main/resources. Works as expected when deployed to tomcat. Then I add a dependency that has its own log4j2.json file. The log4j2 config resolution picks that file before my xml file. I then exclude the jackson json libraries thinking that log4j will skip the json file and read my xml file. Instead, I get the message: "ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console."
I believe you can achieve the same result by putting both a log4j2.xml and log4j2.json file in your classpath and not including the jackson libraries.
It would be great if log4j could at least warn the user that it is short circuiting configuration resolution because it found a json configuration without any jackson libraries to read it.