I am trying to use log4j in a project I am executing with the exec-maven-plugin. I have tried placing the file in the following locations:
$PROJECT_HOME
$PROJECT_HOME/src/main/resources
$PROJECT_HOME/target
$PROJECT_HOME/target/classes
For all locations of the file, I am getting the following message when executing the code:
log4j:WARN No appenders could be found for logger (mypacakge.MyClass).
log4j:WARN Please initialize the log4j system properly.
Where should the log4j.properties
file be located?
exec-maven-plugin config:
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<mainClass>mypackage.Main</mainClass>
</configuration>
</plugin>
...