ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Pellow" <nick.pel...@mindmatics.de>
Subject AW: AW: configuring Log4J from build.xml
Date Fri, 28 Mar 2003 17:13:55 GMT
Erik, 

> -----Ursprungliche Nachricht-----
> Von: Erik Price [mailto:eprice@ptc.com]

> Nick Pellow wrote:
> > Hi Erik, 
> > I have run into your problem before! I solved it with a 
> > small sortie of ant tasks, not very elegant.

> the sortie of Ant tasks wasn't necessary.  The default initialization of 
> Log4J takes the value of the "log4j.configuration" property and attempts 
> to convert it into a URL.  I was making the assumption that the Windows 
> file path would automatically turn into a valid URL.  All I had to do 
> was prepend my <sysproperty> value with the "file" protocol, like so:
> 
>        <sysproperty key="log4j.configuration"
>                     value="file://${test.log4j.props}"/>
> 
> And the default Log4J initialization worked perfectly!

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.

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.

> if you're still building that 
> particular project, 

Sure am. Gets built after every cvs commit.

Thanks again Erik, 
Nick.

> 
> Thanks again Nick.
> 
> 
> Erik
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


Mime
View raw message