Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 28971 invoked from network); 17 Aug 2009 14:02:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Aug 2009 14:02:45 -0000 Received: (qmail 88792 invoked by uid 500); 17 Aug 2009 14:02:51 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 88764 invoked by uid 500); 17 Aug 2009 14:02:51 -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 88755 invoked by uid 99); 17 Aug 2009 14:02:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2009 14:02:51 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of karym6@hotmail.com designates 65.55.111.172 as permitted sender) Received: from [65.55.111.172] (HELO blu0-omc4-s33.blu0.hotmail.com) (65.55.111.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2009 14:02:38 +0000 Received: from BLU127-W18 ([65.55.111.136]) by blu0-omc4-s33.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 17 Aug 2009 07:02:17 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_a4ad3690-a13f-4749-a957-428af72339b1_" X-Originating-IP: [194.9.188.22] From: Karim Bourouba To: Subject: RE: Adding custom logging properties Date: Mon, 17 Aug 2009 15:02:18 +0100 Importance: Normal In-Reply-To: <25007016.post@talk.nabble.com> References: <25006538.post@talk.nabble.com> <25007016.post@talk.nabble.com> MIME-Version: 1.0 X-OriginalArrivalTime: 17 Aug 2009 14:02:17.0961 (UTC) FILETIME=[54CF1D90:01CA1F43] X-Virus-Checked: Checked by ClamAV on apache.org --_a4ad3690-a13f-4749-a957-428af72339b1_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Ah=2C i think I see. =20 Have you considered just logging the XML as a string to the DB=2C then use = something else to parse it at a latter stage? =20 > Date: Mon=2C 17 Aug 2009 06:48:42 -0700 > From: adamtappis@hotmail.com > To: log4net-user@logging.apache.org > Subject: RE: Adding custom logging properties >=20 >=20 > Hi Karim=2C >=20 > No that's not my question. >=20 > Apart from a custom message I also wish to log some custom event data i.e= . a > collection of properties. The target for this will eventually be a SQL ta= ble > which has an XML type column i.e. rathert han just adding a customerID I > might have 10 different properties to add. >=20 > Using the global context for this is not an acceptable solution - > assuggested in one of the other threads I read.=20 >=20 >=20 > Karim Bourouba wrote: > >=20 > >=20 > > I have to say I only glanced through this very quickly and I am a littl= e > > confused. I am at work just now=2C so my attention is split=2C please b= ear > > with me. > >=20 > >=20 > >=20 > > Are you asking if custom messages can be logged via log4net? If so=2C t= hen > > the quick answer is yes. Implementation is very simple as well=2C but i= n > > case I missed your point can you let us know if this is what you are > > after? > >=20 > >=20 > >=20 > > Seems like this is the log4net topic of the day today :) > >=20 > >=20 > >=20 > >=20 > >=20 > >> Date: Mon=2C 17 Aug 2009 06:12:29 -0700 > >> From: adamtappis@hotmail.com > >> To: log4net-user@logging.apache.org > >> Subject: Adding custom logging properties > >>=20 > >>=20 > >> Hi=2C > >>=20 > >> I've been evaluating log4net recently with a view to using the framewo= rk > >> as > >> a loggin standard for our enterprise applicaption. I see it very easy = to > >> extend the framework=2C however I have some specific logging requireme= nts > >> and > >> I'm not sure what would be the easiest way implement these with minima= l > >> coding. > >>=20 > >> At some time in the future=2C we aim to build a consolidated logging > >> database > >> that will capture logging data from our server application suite. The > >> information that needs to be logged will differ per service/applicapti= on > >> and > >> to that end I would aim to have a table schema that has the standard > >> logging > >> columns plus a generic XML column (no defined schema) to act as a > >> property > >> bag for custom information associated with a specific event. > >>=20 > >> We don't have time to develop the logging repository at present=2C how= ever > >> I'm > >> stressing that we should build logging into our code from the start > >> rather > >> than trying to retro-fitting it later which would be far more costly. > >>=20 > >> So I need my code to be able to fire off logging messages with a list = or > >> arbitrary custom properties that get formatted into an XML string. For > >> now > >> the messages can be written to a text file and later we'll configure a= nd > >> AdoNetAppender to write to out logging database. > >>=20 > >> So my questions are: > >> - Is this possible using configuration only? (I susopect not) > >> - If not then which custom objects do I need to create? From what I've > >> seen > >> so far I think I'll need to code my own Layout Class > >> - The ILog interface doesn't doesn't expose a method that takes a > >> property > >> bag (or dictionary)=2C but it appears that the LoggingEvent object doe= s. > >> Does > >> that mean I would have to make my logging calls using ILog.Logger.Log(= )? > >> - Could someone provide some sample code please? > >> --=20 > >> View this message in context: > >> http://www.nabble.com/Adding-custom-logging-properties-tp25006538p2500= 6538.html > >> Sent from the Log4net - Users mailing list archive at Nabble.com. > >>=20 > >=20 > > _________________________________________________________________ > > Windows Live Messenger: Celebrate 10 amazing years with free winks and > > emoticons. > > http://clk.atdmt.com/UKM/go/157562755/direct/01/ > >=20 > =3B-)=3B-) > --=20 > View this message in context: http://www.nabble.com/Adding-custom-logging= -properties-tp25006538p25007016.html > Sent from the Log4net - Users mailing list archive at Nabble.com. >=20 _________________________________________________________________ Upgrade to Internet Explorer 8 Optimised for MSN. =20 http://extras.uk.msn.com/internet-explorer-8/?ocid=3DT010MSN07A0716U= --_a4ad3690-a13f-4749-a957-428af72339b1_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Ah=2C i think I see.

 =3B

Have you considered just logging the XML as a string to the DB=2C then u= se something else to parse it at a latter stage?



 =3B
>=3B Date: Mon=2C 17 Aug 2009 06:48:42 -0700
>=3B From: adamtapp= is@hotmail.com
>=3B To: log4net-user@logging.apache.org
>=3B Subj= ect: RE: Adding custom logging properties
>=3B
>=3B
>=3B H= i Karim=2C
>=3B
>=3B No that's not my question.
>=3B
&g= t=3B Apart from a custom message I also wish to log some custom event data = i.e. a
>=3B collection of properties. The target for this will eventua= lly be a SQL table
>=3B which has an XML type column i.e. rathert han = just adding a customerID I
>=3B might have 10 different properties to = add.
>=3B
>=3B Using the global context for this is not an accep= table solution -
>=3B assuggested in one of the other threads I read. =
>=3B
>=3B
>=3B Karim Bourouba wrote:
>=3B >=3B >=3B >=3B
>=3B >=3B I have to say I only glanced through this = very quickly and I am a little
>=3B >=3B confused. I am at work just= now=2C so my attention is split=2C please bear
>=3B >=3B with me.>=3B >=3B
>=3B >=3B
>=3B >=3B
>=3B >=3B Are y= ou asking if custom messages can be logged via log4net? If so=2C then
&g= t=3B >=3B the quick answer is yes. Implementation is very simple as well= =2C but in
>=3B >=3B case I missed your point can you let us know if= this is what you are
>=3B >=3B after?
>=3B >=3B
>=3B &= gt=3B
>=3B >=3B
>=3B >=3B Seems like this is the log4net to= pic of the day today :)
>=3B >=3B
>=3B >=3B
>=3B >= =3B
>=3B >=3B
>=3B >=3B
>=3B >=3B>=3B Date: Mon= =2C 17 Aug 2009 06:12:29 -0700
>=3B >=3B>=3B From: adamtappis@hotm= ail.com
>=3B >=3B>=3B To: log4net-user@logging.apache.org
>= =3B >=3B>=3B Subject: Adding custom logging properties
>=3B >=3B= >=3B
>=3B >=3B>=3B
>=3B >=3B>=3B Hi=2C
>=3B >= =3B>=3B
>=3B >=3B>=3B I've been evaluating log4net recently wit= h a view to using the framework
>=3B >=3B>=3B as
>=3B >=3B&= gt=3B a loggin standard for our enterprise applicaption. I see it very easy= to
>=3B >=3B>=3B extend the framework=2C however I have some spec= ific logging requirements
>=3B >=3B>=3B and
>=3B >=3B>=3B= I'm not sure what would be the easiest way implement these with minimal>=3B >=3B>=3B coding.
>=3B >=3B>=3B
>=3B >=3B>=3B= At some time in the future=2C we aim to build a consolidated logging
&g= t=3B >=3B>=3B database
>=3B >=3B>=3B that will capture logging= data from our server application suite. The
>=3B >=3B>=3B informa= tion that needs to be logged will differ per service/applicaption
>=3B= >=3B>=3B and
>=3B >=3B>=3B to that end I would aim to have a = table schema that has the standard
>=3B >=3B>=3B logging
>=3B= >=3B>=3B columns plus a generic XML column (no defined schema) to act = as a
>=3B >=3B>=3B property
>=3B >=3B>=3B bag for custom = information associated with a specific event.
>=3B >=3B>=3B
&g= t=3B >=3B>=3B We don't have time to develop the logging repository at p= resent=2C however
>=3B >=3B>=3B I'm
>=3B >=3B>=3B stressi= ng that we should build logging into our code from the start
>=3B >= =3B>=3B rather
>=3B >=3B>=3B than trying to retro-fitting it lat= er which would be far more costly.
>=3B >=3B>=3B
>=3B >=3B= >=3B So I need my code to be able to fire off logging messages with a lis= t or
>=3B >=3B>=3B arbitrary custom properties that get formatted = into an XML string. For
>=3B >=3B>=3B now
>=3B >=3B>=3B t= he messages can be written to a text file and later we'll configure and
= >=3B >=3B>=3B AdoNetAppender to write to out logging database.
>= =3B >=3B>=3B
>=3B >=3B>=3B So my questions are:
>=3B >= =3B>=3B - Is this possible using configuration only? (I susopect not)
= >=3B >=3B>=3B - If not then which custom objects do I need to create?= From what I've
>=3B >=3B>=3B seen
>=3B >=3B>=3B so far I= think I'll need to code my own Layout Class
>=3B >=3B>=3B - The I= Log interface doesn't doesn't expose a method that takes a
>=3B >=3B= >=3B property
>=3B >=3B>=3B bag (or dictionary)=2C but it appear= s that the LoggingEvent object does.
>=3B >=3B>=3B Does
>=3B = >=3B>=3B that mean I would have to make my logging calls using ILog.Log= ger.Log()?
>=3B >=3B>=3B - Could someone provide some sample code = please?
>=3B >=3B>=3B --
>=3B >=3B>=3B View this message= in context:
>=3B >=3B>=3B http://www.nabble.com/Adding-custom-log= ging-properties-tp25006538p25006538.html
>=3B >=3B>=3B Sent from t= he Log4net - Users mailing list archive at Nabble.com.
>=3B >=3B>= =3B
>=3B >=3B
>=3B >=3B ___________________________________= ______________________________
>=3B >=3B Windows Live Messenger: Cel= ebrate 10 amazing years with free winks and
>=3B >=3B emoticons.
= >=3B >=3B http://clk.atdmt.com/UKM/go/157562755/direct/01/
>=3B &g= t=3B
>=3B =3B-)=3B-)
>=3B --
>=3B View this message in con= text: http://www.nabble.com/Adding-custom-logging-properties-tp25006538p250= 07016.html
>=3B Sent from the Log4net - Users mailing list archive at = Nabble.com.
>=3B


Celebrate a decade of Messenger with = free winks=2C emoticons=2C display pics=2C and more. Get Them Now = --_a4ad3690-a13f-4749-a957-428af72339b1_--