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 Jon Skeet <jo...@peramon.com> on 2001/11/08 11:20:04 UTC

RE: using system variables to init log4j

> i'm using log4j 1.1.3 on win2k server!
> 
> i want to have a xml-property file that is using system-/user 
> variables.
> 
> i tried s.th. like %MY_VAR%, ${my.var}, $MY_VAR in the 
> xml-configurator file
> but without success!
> 
> did anybody have a clue how that is working?!

Why did you expect it to work? Note that there is no way in pure Java of
accessing environment variables. Log4j is pure Java. This should tell
you that it's not going to work...

Jon

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


re: using system variables to init log4j

Posted by Leif Hanack <le...@t-systems.de>.
you are right! maybe i descripted my problem wrong.

i want to initialize log4j using some properties that are
set on another place (through java).

i found some log4j-conf snipplets indicating me that it seems
to work (see below)


NOTE:
 # The presence of ${applicationRoot} in the logging configuration
 # is not a mistake. Internally the value of ${applicationRoot}
 # is set so that you can use it with standard log4j
 # properties to get logs to appear in your
 # webapp space.

(http://cvs.apache.org/viewcvs/jakarta-turbine-3/conf/TurbineResources.prope
rties?annotate=1.13)

my target was to get some info about the sentence "internally the value.."

nevertheless, thanks for your answer,
leif

> RE: using system variables to init log4j
>
>
> > i'm using log4j 1.1.3 on win2k server!
> >
> > i want to have a xml-property file that is using system-/user
> > variables.
> >
> > i tried s.th. like %MY_VAR%, ${my.var}, $MY_VAR in the
> > xml-configurator file
> > but without success!
> >
> > did anybody have a clue how that is working?!
>
> Why did you expect it to work? Note that there is no way in pure Java of
> accessing environment variables. Log4j is pure Java. This should tell
> you that it's not going to work...
>
> Jon
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>