cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans>
Subject ${context-root} in log4j.xconf
Date Thu, 23 Jun 2005 09:06:09 GMT

Has anyone tried to use variable substition in log4j.xconf?
It uses
<param name="File" value="${context-root}/WEB-INF/logs/log4j.log" />
as an example of variable substitution.

In my setup ${context-root} is empty however. The log4j docs state that
variables are substituted either from system properties or from declared
variables in the property file itself.

My question is now whether
A) ${context-root} is a "special" property that is set within cocoon
somewhere and is meant to be picked up by log4j (but somehow isn't).
B) is it just a confusing empty variable that is meaningless unless you
define it yourself.

In case the latter applies i would suggest changing it to
${myloggingdirectory} or something, so that people don't expect it to
work out of the box.

Now ideally i would like ${context-root} to be a property set by cocoon
in the log4j environment, pointing to
getServletContext().getRealPath("/"). Can this be done ?


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

View raw message