You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Olivier Lefevre <le...@yahoo.com> on 2009/10/28 15:19:08 UTC

Re: Configuring a file appender using environment variable

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:QCheung@rheinmetall.ca] 
> 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: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org


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