Am I missing something here?  Can't you effectively turn off a category
by not assigning it any appenders (and additivity=false)?

I do admit that I'm very new to Log4j, so I must be missing something.

--Eugene


Ceki Gülcü wrote:
> 
> As you have mentioned in your initial message you can turn off logging for a 
>*specific* category for all priorities lower than FATAL. You can turn off logging 
>entirely for a whole hierarchy by calling the hiearchy.disableAll method.
> 
> You seem to want to turn off logging for a given category for FATAL messages as 
>well. Why would you want to turn off logging for fatal messages?
> 
> In any case, an OFF priority will be available in log4j version 1.2. It is already 
>in our CVS rep. Regards, Ceki
> 
> At 16:15 30.07.2001 -0400, you wrote:
> 
> >I'm wondering if the answer is extending Priority to accomodate
> >Priority.OFF?
> >
> >
> >
> >
> >                    "Sam Newman"
> >                    <sam.newman@stam       To:     "LOG4J Users Mailing List" 
><[EMAIL PROTECTED]>
> >                    plets.com>             cc:     (bcc: Craig 
>Reichenbach/CAM/Lotus)
> >                                           Subject:     disabling categories (was: 
>channels in Log4j)
> >                    07/30/2001 05:48
> >                    AM
> >                    Please respond
> >                    to "LOG4J Users
> >                    Mailing List"
> >
> >
> >
> >
> >
> >
> >Gotcha. Sorry if I was appering thick :-). From looking at the code, I
> >couldn't see the expected category.disable or similar method (or am I
> >wrong?) so I guess the only way to disable the logging to a category would
> >be to either wrap the use of the category with your own code (e.g. check is
> >activity before logging) or to remove all the attached appenders. Any
> >veteran Log4j people out here with a better idea?
> >
> >sam
> >----- Original Message -----
> >From: <[EMAIL PROTECTED]>
> >To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
> >Sent: Friday, July 27, 2001 3:22 PM
> >Subject: Re: channels in Log4j
> >
> > Can you turn off a Category or only set it as high as FATAL and
> >> have log methods that are lower than cat.fatal()?  IE as per my other
> >post,
> >> I would like to achieve this:
> >>
> >> log4j.category.foo.bar=OFF, utilFile
> >>
> >> Thanks,
> >> Craig
> >>
> 
> --
> Ceki Gülcü - http://qos.ch
> 
> ---------------------------------------------------------------------
> 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