For the record, the answer is wrong, as I just found out. The ${xxx} does
not expand the xxx environment variable but the xxx Java property, a big
difference! You can work around it by setting some custom property to the
value of the variable in question and using that property in your config,
though. In this particular case no workaround is needed since APPDATA is
the same as the user.home property.

Gallagher, Ron wrote:
Quinn --

Use the syntax ${xxx} in your configuration file, replacing xxx with the
name of the system property that you want to use.

Ron Gallagher, AT&T Mobility

-----Original Message-----
From: Cheung, Quinn [mailto:[email protected]] Sent: Friday, June 01, 2007 10:06 AM
To: Log4J Users List
Subject: Configuring a file appender using environment variable

Is it possible to configure the output file of a file appender using the
environment variable APPDATA (Windows XP)? What is the syntax in the
log4j.properties file and do I have to send an argument to the JVM?

Thanks,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to