I'm trying to get ant setup so that it will route it's output through log4j.  On the 
command line I do:

ant -listener org.apache.tools.ant.listener.Log4jListener

At which point it gives the error shown in the subject line.  I tried specifying the 
DefaultLogger on the command line to no avail.  I couldn't find any log4j.properties 
file within my Ant 1.5.1 distribution so I told ant to use my log4j.properties via the 
ANT_OPTS=-D option.  This didn't help in anyway so I added an org.apache.tools.ant 
appender to my log4j.properties file.  This also had no effect.  I placed the 
log4j-1.2.7 jar in my ant lib directory too just to try and cover my bases.  Any ideas 
guys?  I'm going nuts.  

>>>> log4j.properties <<<<

log4j.rootLogger=debug, stdout, org.apache.tools.ant
log4j.category.org.apache.tools.ant.Project=DEBUG,org.apache.tools.ant
log4j.logger.org.apache.tools.ant=DEBUG
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n

log4j.appender.org.apache.tools.ant=org.apache.log4j.RollingFileAppender
log4j.appender.org.apache.tools.ant.Threshold=DEBUG
log4j.appender.org.apache.tools.ant.File=test.htm
log4j.appender.org.apache.tools.ant.MaxFileSize=1000KB
log4j.appender.org.apache.tools.ant.MaxBackupIndex=1
log4j.appender.org.apache.tools.ant.layout=org.apache.log4j.HTMLLayout
log4j.appender.org.apache.tools.ant.layout.LocationInfo=true
log4j.appender.org.apache.tools.ant.layout.Title=Build Results

Reply via email to