logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Stauffer" <stauffer.ja...@gmail.com>
Subject Re: AW: using variables in log4j xml file
Date Wed, 23 Aug 2006 14:56:26 GMT
Ant uses a command like the following to do that:
        <property environment="env"/>


On 8/23/06, Patrick Wyss <Patrick.Wyss@mobilesolutions.ch> wrote:
> hi,
>
> > So, you've verified that the "env." scope works to look up OS
> > properties in Log4j?
>
> i didn't exactly had this verified on the command line at the time of my last post ;-)
> and: no, it doesn't work :-[
> not outside of ant, that is. shame on me.
>
> > If this works, I guess I stand corrected on my
> > previous statement where
> > I said that this sort of thing wasn't recognized as anything
> > special by Log4j.
> > Or is it that the System class loads up all existing OS
> > properties using the
> > name of the OS property prefixed by "env.", so that it isn't
> > anything special
> > that Log4j is doing, but just a standard Java feature?
>
> unfortunately this is not the case. it's just my ant build script which does load the
OS-specific environment variables, and prepends them with "env.". i have no clue how ant is
doing this, but probably it could be done your own application as well.
>
> bottomline: you have to pass the parameter to java with the -D switch like this
> java -Dlog.dir=%LOG_DIR%
>
> regards
> patrick
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

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


Mime
View raw message