Hi,

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).
OR,
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 ?


Regards,
Jorg


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to