ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Novotny <novo...@aei.mpg.de>
Subject ant tasks and logging
Date Fri, 16 Jul 2004 13:16:32 GMT

Hi,

    I've run into a gnarly problem with using a custom ant task that 
uses log4j for logging. Ideally I would like to have the normal log4j 
props file in my webapp and have log4j configured to use this in 
WEB-INF/classes/log4j.properties.
    However, how can I configure log4j to use this file without 
hardcoding it somewhere? Normally, I set this value using the 
ctx.getRealPath("WEB-INF/classes/log4j.properties") in my servlet, but 
in this case the task knows nothing about a servlet context. the only 
other approach I found was to bundle the log4j file in the props file, 
but this seemed to have an unfortunate side-effect of getting in the way 
of other webapps logging if I recall... what do default ant tasks do for 
logging actually?

    Thanks, Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message