logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <...@qos.ch>
Subject Re: Storing hierarchies in log4j.properties
Date Fri, 21 Sep 2001 00:47:05 GMT

Aha! The ProppertyConfigurator.doConfigure method takes a hierarchy as
a second argument. Just look at the code or the SocketServer example. Regards, Ceki

At 18:32 20.09.2001 -0600, T Master wrote:
>Ceki,
>
>In my code, i create two Hierarchy objects:
>e.g.
>        Hierarchy h1 = new Hierarchy( Category.getInstance("ONE") );
>        Hierarchy h2 = new Hierarchy( Category.getInstance("TWO") );
>I do this so I can separate categories.
>This helps in disabling logging for a certain hierarchy, thus treating
>categories in different hierarchys separately.
>
>This is NOT chained category hierarchy
> e.g.
>   log4j.category.one=INFO
>   log4j.category.one.child=INFO
>
>
>
>I would like to load up these Hierarchy objects from a property file, and
>associate it to a category , that acts as its root.
>e.g.
>    log4j.hierarchy.h1 = ONE
>    log4j.hierarchy.h2 = TWO
>
>   log4j.category.ONE=INFO
>   log4j.category.TWO=INFO
>
>
>
>Is this possible?
>
>T Master.
>
>
>----- Original Message -----
>From: "Ceki Gülcü" <cgu@qos.ch>
>To: "LOG4J Users Mailing List" <log4j-user@jakarta.apache.org>
>Sent: Thursday, September 20, 2001 5:51 PM
>Subject: Re: Storing hierarchies in log4j.properties
>
>
>>
>> I am afraid I do not understand the question. What do you mean by storing
>hierarchies?
>> Have you read the log4j manual or looked at the examples under
>> src/org/apache/log4j/examples?
>>
>> Regards, Ceki
>>
>> At 17:41 20.09.2001 -0600, T Master wrote:
>> >Ceki ,
>> >
>> >Is it possible to store hierarchys in a log4j.properties file?
>> >If so, how?
>> >
>> >There is no example on the subject.
>> >
>> >T Master
>>

--
Ceki Gülcü - http://qos.ch

The world owes Israel a great debt for destroying Saddam's 
French built nuclear reactor in 1981 and thus preventing
nuclear blackmail in the region and perhaps beyond.
                       -- Garry Kasparov (yes, the chess player) 


---------------------------------------------------------------------
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