ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject Re: AW: AW: configuring Log4J from build.xml
Date Fri, 28 Mar 2003 17:36:54 GMT

Nick Pellow wrote:

> Cheers Erik! That works a treat for me now on both my windoze and
> Unix machines. One must remember however that ${test.log4j.props}
> must/be/the/a/fully/qualified/path and not a relative one. I use the
> ${basedir} to help build this.

In my case (Ant 1.5.2) this seems to be happening automatically.  I am 
creating my ${test.log4j.props} property with the following set of 
inherited properties (interspersed across my build.xml):

   <property name="build.home" location="build"/>
   <property name="test.dir"   location="${build.home}/test"/>
   <property name="test.log4j.props"

I am not sure if it is a side-effect of using "location" instead of 
"value" for the <property> but it automatically converts the value of 
the property into an absolute file path.

> Also, something that really helped with this problem:
> Turn the log4j debugging mode on:
> 	<sysproperty key="log4j.debug"
>                    value="true"/>
> It is very nice to see exactly what is happening under the hood of log4j
> at runtime.

Excellent -- I will add this to my build.xml to see what is going on. 
(Although, in my Log4J configuration file I have

     # Set root logger level, and its only appender to A1.
     log4j.rootLogger=DEBUG, A1
     # But ignore most messages from Apache libs

because if I don't, then it ends up printing all of the debug messages 
from the numerous Jakarta libraries I am using, cluttering up my log 
file! :)  So I may have to take this into account.)


View raw message