This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Can someone point me to some sample configuration files for using the log4jListener for logging in ant? The only documentation I found through google documents using the -listener property when envoking ant, but it is not clear to me where Log4j will get its configuration information from. i.e do I configure it via the build.properties used by ant, by a log4j.properties file located ??? in ants home directory? in the cwd directory, in the build root? Thanks in advance for any help Jeff Gaer
The log4j jar should be in your Ant lib, and the log4j.properties should be in your current directory, i.e., where the build.xml is. Here's an example that keeps rolling log files for builds, and e-mails you when there is an error. (This example comes from Java Development with Ant by Erik Hatcher and Steve Loughran, Copyright (c) 2003, Manning Press.)