Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 21593 invoked from network); 17 Jan 2006 10:06:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Jan 2006 10:06:38 -0000 Received: (qmail 88062 invoked by uid 500); 17 Jan 2006 10:06:36 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 88032 invoked by uid 500); 17 Jan 2006 10:06:35 -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 88021 invoked by uid 99); 17 Jan 2006 10:06:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jan 2006 02:06:35 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_POST,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [62.24.128.69] (HELO smtp-2.opaltelecom.net) (62.24.128.69) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jan 2006 02:06:34 -0800 Received: from [62.24.170.28] (helo=01COR699) by smtp-2.opaltelecom.net with esmtp (Exim 3.36 #1) id 1EynjA-0004v9-00 for log4net-user@logging.apache.org; Tue, 17 Jan 2006 10:06:12 +0000 From: "Fahad Sarwar" To: "'Log4NET User'" Subject: Extending Log4Net Date: Tue, 17 Jan 2006 10:06:12 -0000 Message-ID: <032101c61b4d$a55f0f20$1c06a8c0@01COR699> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0322_01C61B4D.A55F0F20" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 thread-index: AcX/H6PBFOqlo7O2Roq7cKVoB8BZPAcJrpWg In-Reply-To: <015c01c5ff1f$a3e4ff50$1c06a8c0@01COR699> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0322_01C61B4D.A55F0F20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I have just started to use the latest version of log4net 1.2.9 and would like to know how best to extend its capabilites to do what i need. We currently have our own logging application which takes an object called LogEntry (containing 5 parameters including a Message field) and makes use of MSMQ and WebService technology. It is easy enough to write an Appender which extends AppenderSkeleton and overrides the Append method to make a call to the WebService. But the difficulty is getting the LogEntry object to the Appender to send to the WebService. What would be the best way to do this? I guess itll involve the DefaultRenderer class in someway but not sure how to use this or how to extend it to pass on the LogEntry object. Within our code we use the patternlayout as its the most flexible and provides the most information. I would like to extend this class to log each item within the LogEntry object as a seperate attribute, i.e. LogEntry.Category can use %cat, LogEntry.Application %app etc. However i would like the LogEntry.Message property to use the %m / %message tag and dont want every property within object to outputted to an appender when %m / %message is used. Any ideas how this can be achieved? Fahad Sarwar Opal Telecom Applications Team Irlam Tel: +44 161 222 2145 Fax: +44 161 222 2008 Email: fsarwar@opaltelecom.co.uk This communication together with any attachments transmitted with it ("this E-Mail") is intended only for the use of the addressee and may contain information which is privileged and confidential. If the reader of this E-Mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient you are hereby notified that any use, dissemination, forwarding, printing or copying of this E-Mail is strictly prohibited. Addressees should check this E-mail for viruses. The Company makes no representations as regards the absence of viruses in this E-Mail. If you have received this E-Mail in error please notify our IT Support Team immediately by telephone on 0845 456 9100 or via e-mail at support@opaltelecom.co.uk Please then immediately delete, erase or otherwise destroy this E-Mail and any copies of it. Any opinions expressed in this E-Mail are those of the author and do not necessarily constitute the views of the Company. Nothing in this E-Mail shall bind the Company in any contract or obligation. For the purposes of this E-Mail "the Company" means Opal Telecom Ltd. Please feel free to visit our website: www.opaltelecom.co.uk Opal Telecom Ltd (Registered in England & Wales No. 3849133) Brinell Drive, Northbank Industrial Park, Irlam, Manchester M44 5BL. A member of the Carphone Warehouse Group of Companies ------=_NextPart_000_0322_01C61B4D.A55F0F20 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi,
 
I have just started to use the latest version = of=20 log4net 1.2.9 and would like to know how best to extend its capabilites = to do=20 what i need.  We currently have our own logging application which = takes an=20 object called LogEntry (containing 5 parameters including a Message = field) and=20 makes use of MSMQ and WebService technology. 
 
It is easy enough to write an Appender which = extends=20 AppenderSkeleton and overrides the Append method to make a call to the=20 WebService.  But the difficulty is getting the LogEntry object to = the=20 Appender to send to the WebService.  What would be the best way to = do=20 this?  I guess itll involve the DefaultRenderer class in someway = but not=20 sure how to use this or how to extend it to pass on the LogEntry = object. =20
 
Within our code we use the patternlayout = as its=20 the most flexible and provides the most information.  I would like = to=20 extend this class to log each item within the LogEntry object as a = seperate=20 attribute, i.e. LogEntry.Category can use %cat, LogEntry.Application = %app=20 etc.  However i would like the LogEntry.Message property to use the = %m /=20 %message tag and dont want every property within object to outputted to = an=20 appender when %m / %message is used.  Any ideas how this can be=20 achieved?
 
 

Fahad = Sarwar

Opal=20 Telecom

Applications=20 Team

Irlam

Tel: +44 161=20 222 2145

Fax: +44 161=20 222 2008

Email:=20 fsarwar@opaltelecom.co.uk

 

This=20 communication together with any attachments transmitted with it ("this = E-Mail")=20 is intended only for the use of the addressee and may contain = information which=20 is privileged and confidential. If the reader of this E-Mail is not the = intended=20 recipient or the employee or agent responsible for delivering it to the = intended=20 recipient you are hereby notified that any use, dissemination, = forwarding,=20 printing or copying of this E-Mail is strictly prohibited. Addressees = should=20 check this E-mail for viruses. The Company makes no representations as = regards=20 the absence of viruses in this E-Mail. If you have received this E-Mail = in error=20 please notify our IT Support Team immediately by telephone on 0845 456 = 9100 or=20 via e-mail at support@opaltelecom.co.uk Please then immediately delete, = erase or=20 otherwise destroy this E-Mail and any copies of = it.

Any=20 opinions expressed in this E-Mail are those of the author and do not = necessarily=20 constitute the views of the Company. Nothing in this E-Mail shall bind = the=20 Company in any contract or obligation.

For the=20 purposes of this E-Mail "the Company" means Opal Telecom Ltd.  Please feel free to visit our = website:=20 www.opaltelecom.co.uk

Opal=20 Telecom Ltd (Registered in England = &=20 Wales = No.=20 3849133)

Brinell=20 Drive, = Northbank=20 Industrial=20 Park, = Irlam,=20 Manchester = M44=20 5BL.

A = member of=20 the Carphone Warehouse Group of Companies

 
------=_NextPart_000_0322_01C61B4D.A55F0F20--