Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 91474 invoked from network); 5 May 2010 11:12:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 May 2010 11:12:41 -0000 Received: (qmail 30572 invoked by uid 500); 5 May 2010 11:12:41 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 30517 invoked by uid 500); 5 May 2010 11:12:40 -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 30509 invoked by uid 99); 5 May 2010 11:12:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 11:12:39 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yorik.sar@gmail.com designates 74.125.82.47 as permitted sender) Received: from [74.125.82.47] (HELO mail-ww0-f47.google.com) (74.125.82.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 11:12:32 +0000 Received: by wwe15 with SMTP id 15so5216wwe.34 for ; Wed, 05 May 2010 04:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=sFkXF/CgF62Uwn4CuBDw8+Sf6zqQ4hmd1ktmI62R4Sc=; b=DjtX/6k+Ro908bMJ8PdUMF6rAZ9ORUP0h+BsciltYChNSM9jWwRSO2SVz8Mj65gqEL Qs+55kE2jMUHtNn95RWPlaY++uUh9zGx/iCf8PIim0glgpoVXjyW7Qyl9N25JioVEfs1 nHEQh/8lqxD6+lRDncrajb1/GdM9mTQRiKNTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=Ht/Rozn/0NG0AF9ky5GRc4oZfKUUzW51ealfZ1HJ3SESnbq5X8kh+yRFOIkhCSbcJH YZSeriVzxWHVUZmvmqXZXVwHGNygkIzOf5wev17SKUNMDN84sjbhFT4SoH9yJjRHRchH M1e9oNADCwhIWm/CjStPYb1FEKC4EyawErHu0= Received: by 10.216.85.8 with SMTP id t8mr2430700wee.39.1273057932169; Wed, 05 May 2010 04:12:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.185.194 with HTTP; Wed, 5 May 2010 04:11:52 -0700 (PDT) In-Reply-To: <28459340.post@talk.nabble.com> References: <28459133.post@talk.nabble.com> <28459340.post@talk.nabble.com> From: Yuriy Taraday Date: Wed, 5 May 2010 15:11:52 +0400 Message-ID: Subject: Re: Cannot get PropertyFilter to work To: Log4NET User Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Yes, properties is the only way. I think, the best way to find out, what's wrong, is to step through log4net source with debugger. On Wed, May 5, 2010 at 2:54 PM, ITemplate wrote: > > Hi, > > Tried that already both Stacks and Properties - same outcome. My issue he= re > is that I need to append some key-value pair for each log entry - and the= n > in configuration I must setup that specific key-value pairs should result= in > logging to multiple appenders. The properties seems like the only way to = do > this correct? > > Only have to find out why this filter isn't returning true. > > -- > Werner > > > > Yuriy Taraday wrote: >> >> As I understand, this filter checks TreadContext properties, not >> LoggingEvent properties. You should try >> log4net.ThreadContext.Properties["ID"] =3D >> "87e18d7e477349ef9713e19c40ea393a"; >> >> On Wed, May 5, 2010 at 2:26 PM, ITemplate wrote: >>> >>> Hi, >>> >>> I have an appender that has 1 PropertyFilter like so: >>> >>> =C2=A0 =C2=A0 >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 >>> =C2=A0 =C2=A0 =C2=A0 >>> =C2=A0 =C2=A0 =C2=A0 >>> >>> In code I am using ILogger like so: >>> >>> =C2=A0 =C2=A0 =C2=A0log4net.Core.LoggingEvent ev =3D new log4net.Core.L= oggingEvent(...); >>> =C2=A0 =C2=A0 =C2=A0ev.Properties["ID"] =3D "87e18d7e477349ef9713e19c40= ea393a"; >>> >>> If I remove that filter the log is written alright. All other filters I >>> have >>> tested are working correct. If I run debug mode I can see log4net >>> discovering the propertyFilter correct. But it never kicks in. Where is >>> my >>> error? >>> >>> -- >>> Werner >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/Cannot-get-PropertyFilter-to-work-tp28459133p2845= 9133.html >>> Sent from the Log4net - Users mailing list archive at Nabble.com. >>> >>> >> >> > > -- > View this message in context: http://old.nabble.com/Cannot-get-PropertyFi= lter-to-work-tp28459133p28459340.html > Sent from the Log4net - Users mailing list archive at Nabble.com. > >