ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Anderson <>
Subject log4j seems not read by ant
Date Wed, 23 Feb 2011 08:27:08 GMT
I have a build.xml file which will read, stored in
conf, from conf and log message to another dir e.g. logs/file.log

My build file's classpath points to conf and then when launch the
application it will have classpath provided.

   <path id="myapp.classpath">
        <pathelement location="${spider.conf}"/>

And in target run, it provides with classpath

   <target name="run" depends="clean,package">
        <java fork="true" classname="...">
                <path refid="myapp.classpath"/>
                <path location="${project.jar}"/>
            <arg line="-Dlog4j.debug"/>

The content of

log4j.rootLogger = DEBUG, RRX

log4j.rootLogger = INFO, LOGFILE

log4j.appender.LOGFILE.layout=org.apache.log4j.Pattern Layout
log4j.appender.LOGFILE.layout.ConversionPattern=%d %-5p %c - %m%n

However, it seems ant does not read so no message is
written to file.

I supply ant with -Dlog4j.debug in the target run or in command line
directly e.g. ant run -Dlog4j.debug, but there is no different. How
can I check if log4j property is read from config or not? Or how to
fix this problem?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message