0

I created a simple gradle project that builds and runs a simple java 9 module.

This module requires only log4j and expects to find a log4j2.xml file to configure the logger.

The problem I am having is that it seems that this file is not added to the module classpath and when I execute./gradlew run I always get "ERROR StatusLogger No log4j2 configuration file found. Using default configuration:" as the first output line, which means it could not find the file (which is under src/main/resources).

If I import this project in IntelliJ and run it, I get the exact same error.

Am I doing something wrong? Shouldn't this file be automatically added to the module classpath?

  • Related [log4j2 configuration file not found with java 9](https://stackoverflow.com/questions/46138895/log4j2-configuration-file-not-found-with-java-9) – Naman Oct 20 '17 at 07:03
  • Thank you for the heads up! I believe the problem lies in gradle. – Pedro Andrez Oct 20 '17 at 09:09

0 Answers0