Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 8263 invoked from network); 8 Dec 2005 08:06:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Dec 2005 08:06:46 -0000 Received: (qmail 94187 invoked by uid 500); 8 Dec 2005 08:06:44 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 94166 invoked by uid 500); 8 Dec 2005 08:06:43 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 94155 invoked by uid 99); 8 Dec 2005 08:06:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2005 00:06:43 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [82.150.97.38] (HELO mail1.brevanhoward.com) (82.150.97.38) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2005 00:06:42 -0800 Received: from bhmail4.brevanhoward.com (HELO bhmail4.rivagecapital.com) ([82.150.98.52]) by mail1.brevanhoward.com with ESMTP; 08 Dec 2005 08:06:20 +0000 X-SBRS: 4.2 Received: from bhmail1.rivagecapital.com ([82.150.98.60] RDNS failed) by bhmail4.rivagecapital.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Dec 2005 08:06:19 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: filtering on message source Date: Thu, 8 Dec 2005 08:06:19 -0000 Message-ID: <383BF6A1AD220A4796FE90A9EC3FB406010DF5B8@bhmail1.rivagecapital.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: filtering on message source Thread-Index: AcX6wAenD/3js8qkQza+FdyTp2pHFABDaxrA From: "Dalton, Barnaby" To: "Log4NET User" X-OriginalArrivalTime: 08 Dec 2005 08:06:19.0230 (UTC) FILETIME=[452C67E0:01C5FBCE] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks, Do I need to create a logger named Company.Project.UI.Login/Logout or does logger refer to a classname and will work with only a root logger defined?=20 Barney > -----Original Message----- > From: Ron Grabowski [mailto:rongrabowski@yahoo.com]=20 > Sent: Tuesday 06 December 2005 23:51 > To: Log4NET User > Subject: Re: filtering on message source >=20 >=20 > Here's how to use it: >=20 > > > > =20 > >=20 > --- Ron Grabowski wrote: >=20 > > public class CustomFilter : FilterSkeleton > > { > > private Level logLevelEqualOrAbove =3D Level.All; > > private Hashtable acceptAllMessagesLookup =3D new Hashtable(); > >=20 > > public override FilterDecision Decide(LoggingEvent loggingEvent) { > > if (acceptAllMessagesLookup.Contains(loggingEvent.LoggerName)) > > { > > return FilterDecision.Accept; > > } > > else > > { > > if (Level.Compare(loggingEvent.Level,LogLevelEqualOrAbove)>=3D0) > > { > > return FilterDecision.Accept; > > } > > else > > { > > return FilterDecision.Deny; > > } > > } > > } > >=20 > > public Level LogLevelEqualOrAbove > > { > > get { return logLevelEqualOrAbove; } > > set { logLevelEqualOrAbove =3D value; } > > } > >=20 > > public void AddAllMessagesFromLogger(string logger) > > { > > acceptAllMessagesLookup[logger] =3D null; > > } > > } >=20