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 Michiel Meeuwissen <Mi...@omroep.nl> on 2001/01/17 12:27:11 UTC

class attributes

I'm not sure I'm understanding them. 

I'm using a  subclass of 'Category'. For this to work I think I have to
put things in my configuration file like:

<category name="A.B" class="org.apache.log4j.examples.MyCategory" >

and also

<category name="A" class="org.apache.log4j.examples.MyCategory" > 

etc.

But I'm willing to use always 'MyCategory', in the whole project (this
is only an example). Can't I set a default somehow? Why is this
property not inherited from A to A.B (or am I mistaken?), or even from
<root>?


greetings, 

 Michiel

-- 
Michiel Meeuwissen - NOS internet 
Mediacentrum kamer 203 - tel. +31 (0)35 6773065
http://www.mmbase.org  
http://www.purl.org/NET/mihxil/


Re: class attributes

Posted by Ceki Gulcu <cg...@urbanet.ch>.
Michiel,

I am afraid there is nothing to understand. The class attribute of a 
category element is not inherited. It has to be specified each time. This 
is an inconsistency in DOMConfigurator especially since the 
PropertyConfigurator supports an option called categoryFactory. I'll add 
this to my todo list. Ceki

ps: Have you considered using an XML entity to replace the repetitive 
class="org.apache.log4j.examples.MyCategory" declarations?


At 12:27 17.01.2001 +0100, you wrote:
>I'm not sure I'm understanding them.
>
>I'm using a  subclass of 'Category'. For this to work I think I have to
>put things in my configuration file like:
>
><category name="A.B" class="org.apache.log4j.examples.MyCategory" >
>
>and also
>
><category name="A" class="org.apache.log4j.examples.MyCategory" >
>
>etc.
>
>But I'm willing to use always 'MyCategory', in the whole project (this
>is only an example). Can't I set a default somehow? Why is this
>property not inherited from A to A.B (or am I mistaken?), or even from
><root>?
>
>
>greetings,
>
>  Michiel
>
>--
>Michiel Meeuwissen - NOS internet
>Mediacentrum kamer 203 - tel. +31 (0)35 6773065
>http://www.mmbase.org
>http://www.purl.org/NET/mihxil/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

---
Freedom as in the capacity to exercise choice.