You could also use an XML type include.

add this to the top of the specific_log4j.xml file:
        <!DOCTYPE log4j:configuration [
                <!ENTITY generic-file SYSTEM "generic.xml">
        ]>
        <log4j:configuration ...>
And then where you need to include the file:
        &generic-file;
And get on with the rest:
        </log4j:configuration>

Anyone know what happens when you have two definitions that are the same
in the
DOMConfigurator?

Alan.

-----Original Message-----
From: Ceki Gulcu [mailto:[EMAIL PROTECTED]]
Sent: 21 November 2001 21:50
To: Log4J Users List
Subject: RE: Custom and default configuration using DOMConfigurator


At 14:58 21.11.2001 +0100, Georg Lundesgaard wrote:
>Ceki,
>
>Thanks for such a quick answer. But I'm not sure what you mean by the
>following paragraph:
>
>> Having said that, it is very important to remember
>> that a category is defined in a single line (i.e. in a
>> single property). Thus, if the separate properties are
>> equivalent to the merged properties, then the two sets
>> of properties are disjoint (they have no elements in
>> common). 
>
>Isn't it required to define in single property? And, how can a category
>be defined in multiple properties?

A category can be defined only in a single property. Hence, merging two
property files defining the same category will lead to unexpected
results. Thus, merging will only work properly with disjoint category
definitions. Disjoint category definitions in turn mean that invoking
PropertyConfigurator (or DOMConfigurator) on multiple times is safe as
long as the category definitions in the different config files are
disjoint....

Hope this helps, Ceki


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


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

Reply via email to