I am trying to use log4j in a project that I am executing with exec-maven-plugin. I tried to place the file in the following places:
$PROJECT_HOME $PROJECT_HOME/src/main/resources $PROJECT_HOME/target $PROJECT_HOME/target/classes
For all file locations, I get the following message when I execute 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 log4j.properties
?
Exec-maven-plugin configuration:
... <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2</version> <configuration> <mainClass>mypackage.Main</mainClass> </configuration> </plugin> ...
source share