logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Wyss" <Patrick.W...@mobilesolutions.ch>
Subject AW: AW: using variables in log4j xml file
Date Wed, 23 Aug 2006 08:41:30 GMT
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


Mime
View raw message