You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jason Novotny <no...@aei.mpg.de> on 2004/07/16 15:16:32 UTC
ant tasks and logging
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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org