You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Marc Stock <st...@pagetechnologies.com> on 2002/12/18 20:13:22 UTC
No appenders could be found for logger (org.apache.tools.ant)
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
AW: No appenders could be found for logger (org.apache.tools.ant)
Posted by Detlef Brendle <de...@canoo.com>.
log4j reads your log4j.properties from the classpath starting at '/'.
Guess your log4j just cannot be found at all.
detlef
-----Ursprüngliche Nachricht-----
Von: Marc Stock [mailto:stockm@pagetechnologies.com]
Gesendet: Mittwoch, 18. Dezember 2002 20:13
An: ant-user@jakarta.apache.org
Betreff: No appenders could be found for logger (org.apache.tools.ant)
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
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>