Setting the log4j variables is not necessary if we simply place the log4j properties file inside src/main/resources. Doing this also works on the filesystem and is not limited to Eclipse.