thank you,

        Rami

-----Original Message-----
From: Thomas Muller [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 12:23 PM
To: Log4J Users List
Subject: RE: setting a directory to the file in one of the file-appenders


Both PropertyConfigurator and DOMConfigurator support rudimentary variable
interpolation from the System properties.

java -Dmylog.dir=/usr/home/foo/log Foo.java

And in your config file:

<appender name="FOO_APPENDER" class="org.apache.log4j.FileAppender">
        <param name="File" value="${mylog.dir}/foo.log" />
        <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%d{ABSOLUTE} [%x]
[%t] - %m%n" />
        </layout>
</appender>

Hope this helps,

--

Thomas



| -----Original Message-----
| From: Abramson, Rami [mailto:[EMAIL PROTECTED]]
| Sent: 19 December 2002 06:27
| To: Log4j-User (E-mail)
| Subject: setting a directory to the file in one of the file-appenders
|
|
| Hello,
|
| How is it possible to control the directory to which the log files are
| written to.
|
|       thank you,
|
|               Rami A.
|
|
| --
| 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 Commercial Communication 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]>

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

Reply via email to