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:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 9:40 AM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to