DOMConfigurator supports rudimentary variable interpolation. Variables found in the System properties can be used in the XML config file like this:
<appender name="FOO" class="org.apache.log4j.DailyRollingFileAppender"> <param name="file" value="${log.home}/foo.log" /> <param name="append" value="true" /> <param name="datePattern" value="'.'yyyy-MM-dd" /> <param name="threshold" value="DEBUG" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="${log4j.appender.FOO.pattern}" /> </layout> </appender> Hope this helps. -- Thomas | -----Original Message----- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] | Sent: 20 August 2002 16:32 | To: Log4J Users List | Subject: Example of variable substitution in an XML formatted config | file | | | | I am using the DOMConfigurator, and would like to make use of the variable | substitution available to Log4J. | | Does anyone have an XML example of this? | | The book only has a log4j.properties file example, and I do not know the | XML syntax. I get SAXParser errors... | | | | Luc | | | | -- | To unsubscribe, e-mail: | <mailto:[EMAIL PROTECTED]> | For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> ************************************************************************* Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. The information supplied in this email should be treated in confidence. No liability whatsoever is accepted for any loss or damage suffered as a result of accessing this message or any attachments. ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>