Log4j PropertyConfigurator supports rudimentary interpolation, meaning you
can use a previsously defined value as this:

key=myValue
..
log4j.foo=bar/${key}

I'm not completely sure, but I guess you can use keys from system properties
as well. Then it's easy to use environment variables: just insert the one(s)
you need with -D when you start the VM.

DOMConfigurator definately supports interpolation of system properties.

Hope this helps

--

Thomas



| -----Original Message-----
| From: Steve Simons [mailto:[EMAIL PROTECTED]]
| Sent: 10 September 2001 16:55
| To: [EMAIL PROTECTED]
| Subject: Setting the output directory for log files
|
|
| Hello All,
|
| I'm wanting to know if there is some way I can set the output
| directory for
| log files without specifying the full path and filename for the property:
| log4j.appender.fileout.File (property contained in my log4j configuration
| file).
|
| Ideally I would like to be able to retrieve the temp directory from the
| system and set this as the working directory.  For the above property I
| would just set the name of the file (e.g.
| log4j.appender.fileout.File=example.log).
|
| Can this be done?
|
| Best Regards
| SS
|
| _________________________________________________________________
| Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
|
|



*************************************************************************
Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved. 
Confidential. No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.

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

Reply via email to