config log4j to put logs to a file.