logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken....@bmwna.com
Subject RE: include parameters, properties file in xml?
Date Thu, 09 Oct 2003 21:33:30 GMT
The properties file supports variable substitution in parameter values using
the same syntax as Ant (${<key>}).  The property values will be read from
the system properties, which you can define on the command line at runtime
or set programmatically.  In log4j.properties, you can also define arbitrary
parameters which will be substituted later in the file.  I don't think it
can be done in log4j.xml, based on my inspection of the DTD.

I found the variable substitution useful for setting the log file name based
on the name of each node in a WebLogic cluster.

Ken

-----Original Message-----
From: Richard Bondi [mailto:rbondi@ergito.com]
Sent: Thursday, October 09, 2003 9:40 AM
To: log4j-user@jakarta.apache.org
Subject: include parameters, properties file in xml?


Dear All,

In Ant, you can not only define parameters (eg variables) for use 
throughout a build file, you can define them in a properties file which you 
include in the build file.
This is great for teams: the build file can be kept in cvs, and team 
members can use their properties file to configure it without having to 
check it out.

Is there any way to do the same thing with log4j.xml?

Is there any way to define parameters in log4j.xml just like in ant build 
files (without including a properties file)?

Is there any way to define parameters in a log4j.properties file?

I couldn't find an answer to this searching the mail archives.

Many thanks,
r:b:


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

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


Mime
View raw message