You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by "Keshavan, Rango" <ra...@fmr.com> on 2006/02/14 17:44:27 UTC
How to use an environment variable
I want my log4j.properties to use an environment variable which
specifies the base home directory, so my log directory will be off that.
Does anyone know how to do this?
Thanks!
----------
Rango Keshavan
617 563 2435
Re: How to use an environment variable
Posted by Curt Arnold <ca...@apache.org>.
On Feb 14, 2006, at 10:44 AM, Keshavan, Rango wrote:
> I want my log4j.properties to use an environment variable which
> specifies the base home directory, so my log directory will be off
> that. Does anyone know how to do this?
>
> Thanks!
>
My recollection is that log4cxx exposes all environment variables in
the same way that LOG4J exposes JVM system properties. Which means
that you would just use ${HOME}/foo.log to create a foo.log directory
in the user's home directory. Also, I believe that the current SVN
HEAD also exposes the equivalent of some of the built-in Java
properties so you could also do ${java.io.tmpdir}/foo.txt or $
{user.home}/foo.txt.