That sounds pretty dubious to me. I don't think it will work. Setting
the priority to something high does work fine and I think if we wanted
to allow disabling logging for a category without risking something
being logged anyway, the way to do it would be to have a special
priority higher than FATAL with which categories can be configured but
log messages can't be generated. Since in practice this doesn't seem to
be a real problem I wouldn't worry about it, though.

Anders


Thilo Schottelius wrote:
> 
> Dear Anders,
> how do you think about the idea to remove a created instance of a category
> from the Hashtable of class Hierarchy? This would disable all the logging to
> this instance/class.
> 
> Thilo
> 
> -----Original Message-----
> From: Anders Kristensen [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 27. Juni 2001 22:56
> To: LOG4J Users Mailing List
> Subject: Re: How to switch off the loging?
> 
> Just set the priority associated with the category to something really
> high, e.g. FATAL. This effectively turns off logging for that category.
> (Yes, something logged with priority FATAL will still get logged -- you
> could argue for and against this behaviour but that's how it currently
> works.)
> 
> Anders
> 
> [EMAIL PROTECTED] wrote:
> >
> > But I only want to switch off the logging of a specific category. The
> disableall
> > will disable the logging of all catogories?
> >
> > Thanks,
> > Peter
> >
> > ____________________Reply Separator____________________
> > Subject:    RE: How to switch off the loging?
> > Author: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
> > Date:       6/27/01 12:06 PM
> >
> > Sorry, BasicConfigurator.disable seems to be deprecated. You can use
> > Category.getDefaultHierarchy().disableAll()
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 27, 2001 11:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: How to switch off the loging?
> >
> > I have a category com.mycompany.prod. How to switch off it's loging? I
> mean
> > do
> > not let it log any message to it's appender.
> >
> > Thanks,
> > Peter
> >
> > ---------------------------------------------------------------------
> > 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]
> >
> > Received: from omnivor1.rsp.comsat.com ([134.133.178.45]) by
> > cqgate5.cmc.comsat.com with SMTP
> >   (IMA Internet Exchange 3.13) id 0038C287; Wed, 27 Jun 2001 15:31:38
> -0400
> > Received: from omnivor1.rsp.comsat.com ([134.133.178.45]) by
> > omnivor1.rsp.comsat.com with SMTP (Microsoft Exchange Internet Mail
> Service
> > Version 5.5.2650.21)
> >     id MQS4ACVL; Wed, 27 Jun 2001 15:27:01 -0400
> > Received: FROM neo.it.comsat.com BY omnivor1.rsp.comsat.com ; Wed Jun 27
> > 15:27:01 2001 -0400
> > Received: from apache.org (h31.sny.collab.net [64.208.42.41])
> >     by neo.it.comsat.com (Switch-2.0.1/Switch-2.0.1) with SMTP id
> f5RJDFj22921
> >     for <[EMAIL PROTECTED]>; Wed, 27 Jun 2001 15:13:15 -0400 (EDT)
> > Received: (qmail 8257 invoked by uid 500); 27 Jun 2001 19:20:20 -0000
> > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> > Precedence: bulk
> > List-Post: <mailto:[EMAIL PROTECTED]>
> > List-Help: <mailto:[EMAIL PROTECTED]>
> > List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
> > List-Subscribe: <mailto:[EMAIL PROTECTED]>
> > Reply-To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
> > Delivered-To: mailing list [EMAIL PROTECTED]
> > Received: (qmail 8067 invoked from network); 27 Jun 2001 19:20:15 -0000
> > Message-ID: <[EMAIL PROTECTED]>
> > From: Veerappan Saravanan <[EMAIL PROTECTED]>
> > To: "'LOG4J Users Mailing List'" <[EMAIL PROTECTED]>
> > Subject: RE: How to switch off the loging?
> > Date: Wed, 27 Jun 2001 12:06:36 -0700
> > MIME-Version: 1.0
> > X-Mailer: Internet Mail Service (5.5.2653.19)
> > Content-Type: text/plain;
> > X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
> >
> > ---------------------------------------------------------------------
> > 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]
> 
> ---------------------------------------------------------------------
> 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