Return-Path: Delivered-To: apmail-logging-log4cxx-user-archive@www.apache.org Received: (qmail 10020 invoked from network); 12 May 2010 14:58:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 May 2010 14:58:15 -0000 Received: (qmail 90471 invoked by uid 500); 12 May 2010 14:58:15 -0000 Delivered-To: apmail-logging-log4cxx-user-archive@logging.apache.org Received: (qmail 90451 invoked by uid 500); 12 May 2010 14:58:15 -0000 Mailing-List: contact log4cxx-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4CXX User" List-Id: Delivered-To: mailing list log4cxx-user@logging.apache.org Received: (qmail 90443 invoked by uid 99); 12 May 2010 14:58:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 May 2010 14:58:15 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dalewking@gmail.com designates 209.85.161.47 as permitted sender) Received: from [209.85.161.47] (HELO mail-fx0-f47.google.com) (209.85.161.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 May 2010 14:58:09 +0000 Received: by fxm11 with SMTP id 11so139365fxm.34 for ; Wed, 12 May 2010 07:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=TYjkX5Cfg2MdoATJqupvl+OvpV5KfVx25EHB19HyS18=; b=DcR7PczfL/VHyPOre4kRw4H6vy76o3DB57CFPHONpczjDyJyRUxBLi5S+UCR4IFZh+ HdgxlaSMoL+Mg7vh5JYVHjKcgKx0rjhlbsu7yqy1bPwtcpZlPyE1mIelm9CyoVmi8ozL Dy44vuTiN/5JLOju1FHIFCY2Pj2O3AQ4W4wkk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=enqoIpMzcsW9D8qVGDB9KuZH751s2nm/WRchUFJgxlvXgfTiAjMqZs1AIalihMlFF/ Ay6JCF4aTcnD4ju3jDkH8zDepk+szXrEC/4mdG5q5XfvmxC87+sY7Fb+KhMEanE5EESr Uo60SdHfUDnQcjtuhvMALETs2bwlGs9RbARx8= MIME-Version: 1.0 Received: by 10.223.99.212 with SMTP id v20mr8343210fan.44.1273676268846; Wed, 12 May 2010 07:57:48 -0700 (PDT) Received: by 10.223.116.72 with HTTP; Wed, 12 May 2010 07:57:48 -0700 (PDT) In-Reply-To: <1230D3ACEEC6F44DB545BC0B23BFD19F0380E55F@XMBIL142.northgrum.com> References: <1230D3ACEEC6F44DB545BC0B23BFD19F0380E51B@XMBIL142.northgrum.com> <1230D3ACEEC6F44DB545BC0B23BFD19F0380E55F@XMBIL142.northgrum.com> Date: Wed, 12 May 2010 10:57:48 -0400 Message-ID: Subject: Re: application property From: Dale King To: Log4CXX User Content-Type: multipart/alternative; boundary=000e0cd1e25290404f048666dd01 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd1e25290404f048666dd01 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I just remembered that MDC is local to each thread, so you need to do this in each thread. In my case my code was a business logic DLL that was called by a 3rd party app which created all the threads, so I wrapped all my exposed entry points with MDC::put and MDC::remove. On Wed, May 12, 2010 at 10:45 AM, Prestel, John D. wr= ote: > Thanks, Dale! I=92ll try it and report my findings. > > > > *From:* Dale King [mailto:dalewking@gmail.com] > *Sent:* Wednesday, May 12, 2010 10:41 AM > *To:* Log4CXX User > *Subject:* Re: application property > > > > It does allow it, since I know that I've done it. Unfortunately that was > with a previous employer so I don't have access to the code. > > I don't know if you can do it through the configuration file. I think I d= id > it using an MDC property in my app's initialization code as in: > > MDC::put( "application", "myapp" ); > > On Wed, May 12, 2010 at 10:28 AM, Prestel, John D. > wrote: > > Does log4cxx provide a way to set the =93application=94 property on loggi= ng > events via, presumably, an appender=92s configuration? Chainsaw uses this > property to determine which tab a log message should land in. It seems lo= g4j > provides the ability to do this, but it=92s not clear where log4cxx stand= s. > > Reference: http://markmail.org/message/5ufciwvzoqyeqc5x > > > > > -- > Dale King > --=20 Dale King --000e0cd1e25290404f048666dd01 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I just remembered that MDC is local to each thread, so you need to do this = in each thread. In my case my code was a business logic DLL that was called= by a 3rd party app which created all the threads, so I wrapped all my expo= sed entry points with MDC::put and MDC::remove.

On Wed, May 12, 2010 at 10:45 AM, Prestel, J= ohn D. <John.P= restel@ngc.com> wrote:

Thanks, Dale! I=92ll try it and report my findings.

=A0

From:= Dale King [mailto:dalewking@= gmail.com]
Sent: Wednesday, May 12, 2010 10:41 AM
To: Log4CXX User
Subject: Re: application property

=A0

It does allow it, sin= ce I know that I've done it. Unfortunately that was with a previous employer so I= don't have access to the code.

I don't know if you can do it through the configuration file. I think I= did it using an MDC property in my app's initialization code as in:

=A0=A0 MDC::put( "application", "myapp" );

On Wed, May 12, 2010 at 10:28 AM, Prestel, John D. &= lt;John.Prestel@n= gc.com> wrote:

Does log4cxx provide a way to set the =93application=94 property on logging events via, presumably, an appender=92s configuration? Chainsaw uses this property to determine which = tab a log message should land in. It seems log4j provides the ability to do this,= but it=92s not clear where log4cxx stands.

Reference: http://markmail.org/message/5ufciwvzoqyeqc= 5x




--
Dale King




--
Dale King

--000e0cd1e25290404f048666dd01--