logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabrice DELHOSTE" <Fabrice.DELHO...@gemplus.com>
Subject RE: Using system properties within an XML Log4J configuration file
Date Mon, 02 Apr 2001 13:58:32 GMT
Ceki answered this question just last week.
In 1.0.4, this feature is only available with PropertyConfigurator and not
with DOMConfigurator.
If you want it, it is included in the latest cvs source code.

You can find the detailed answer in the mailing-list search engine (Subject:
File Appender Question):
http://www.mail-archive.com/log4j-user%40jakarta.apache.org/


-----Original Message-----
From: MCCARTHY Richard [mailto:Richard.McCarthy@axa-im.com]
Sent: lundi 2 avril 2001 13:32
To: 'log4j-user@jakarta.apache.org'
Subject: Using system properties within an XML Log4J configuration file


I am using an XML file to configure Log4j within our application and I
would like to use system properties so that I can change the name of the
log4J output file without having to edit the log4j xml file.

I have tried putting a system property into the XML as shown below, but this
does not appear to work. Can anyone tell me if Log4J can in fact use system
properties within its XML configuration files and if so what it is I have
done wrong,

<appender name="STDOUT" class="org.apache.log4j.FileAppender">
           <param name="File" value="${log.name}" />
           <param name="Append" value="false" />
           <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern" value="%d %-5p [%t] %C{2}
(%F:%L) - %m\n"/>
           </layout>
</appender>


Many thanks,

Richard



AXA Investment Managers

Richard McCarthy
Information Technology

7 Newgate Street, London EC1A 7NX
Tel.: +44 (0) 20 7003 1174
Fax: +44 (0) 20 7575 8653
e-mail: richard.mccarthy@axa-im.com


_____________________________________________________________________
This e-mail is confidential and intended only for the
addressee(s) shown.  If you are not an intended recipient, please be advised
that any use, dissemination, forwarding or copying of this e-mail is
strictly prohibited.  Internet e-mails are not necessarily secure and the
AXA Group does not accept responsibility for changes made to this message
after it was sent. Please note that AXA Investment Managers may monitor
incoming and outgoing electronic mail messages. Should you receive this
transmission in error, notify the sender immediately.  Thank you

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message