If you are having trouble working out which log4j.properties file is being used then use this:
for more info click here
Please remember that log4j will load in the properties files in CLASSPATH order.
To force your code to use a specific log file use this:
Sample log4j.properties files:
If you want to change what is written to the logs [dates / classname etc]:
sample log4j.xml file: