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 Thomas Wiedmann <th...@gmx.de> on 2011/03/13 10:25:44 UTC
Re: Setting properties for log4j.xml configuration file
Meanwhile I found the solution (for all, who'll might have the same question
in future:) by defining an XML entity declaring the logfiles directory (or
any other parameter, required, to be referenced in the log4j.xml) - Sample:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" [<!ENTITY log4j:logDir
"C:/MyProject/MyLogs">]>
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="fileout"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="&log4j:logDir;/mytests.log"/>
Thomas Wiedmann
...
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org