Cash Costello created LOG4J2-1643:

             Summary: Configuration resolution when JSON libraries are not 
present skips XML file
                 Key: LOG4J2-1643
             Project: Log4j 2
          Issue Type: Bug
          Components: Configurators
    Affects Versions: 2.7
            Reporter: Cash Costello
            Priority: Minor

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.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to