Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 57634 invoked from network); 18 Jan 2007 21:54:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jan 2007 21:54:26 -0000 Received: (qmail 54258 invoked by uid 500); 18 Jan 2007 21:54:32 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 53859 invoked by uid 500); 18 Jan 2007 21:54:30 -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 53846 invoked by uid 99); 18 Jan 2007 21:54:30 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jan 2007 13:54:30 -0800 X-ASF-Spam-Status: No, hits=1.6 required=10.0 tests=BLANK_LINES_70_80,RCVD_IN_NJABL_PROXY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [68.142.200.120] (HELO web30507.mail.mud.yahoo.com) (68.142.200.120) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 18 Jan 2007 13:54:20 -0800 Received: (qmail 50009 invoked by uid 60001); 18 Jan 2007 21:53:59 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=W9E2azBhYHHfJL54dJS640Q7BFB5H/27fXgwn+mYO7pG43Ing1lQ+FmkdZfPb5K/mGvgh8beDCY+WqFyTzb8/DLqPyoX7ssZpY8epb4P1FeMeLo0SB/31eBxDJJNs2K4LdKeL9Q6kHmfIrFMtUsXm7a34TNQ22GbzozQkngUu/c= ; Message-ID: <20070118215359.50007.qmail@web30507.mail.mud.yahoo.com> Received: from [24.208.153.243] by web30507.mail.mud.yahoo.com via HTTP; Thu, 18 Jan 2007 13:53:59 PST Date: Thu, 18 Jan 2007 13:53:59 -0800 (PST) From: Ron Grabowski Subject: Re: Wrapping Log4Net in a Facade --> incorrect LocationInfo shown for file, methods.... To: Log4NET User MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I believe the pattern is called "abstract factory". =0A=0AYour facade needs= to perform logging using the methods on ILogger and passing in the Type of= your wrapper class. See this class for an implementation and comments as t= o why its necessary:=0A=0A=0A=0Ahttp://svn.apache.org/viewvc/ibatis/trunk/c= s/mapper/IBatisNet.Common.Logging.Log4Net/Log4NetLogger.cs?revision=3D29350= 9&view=3Dmarkup=0A=0A=0A=0AIBatisNet (ibatis.apache.org), Sooda (www.sooda.= org), and The Castle Project (www.castleproject.org) have abstracted loggin= g libraries (to allow the user to switch between log4net, NLog, and some si= mple builtin loggers like a ConsoleLogger) that do similiar things. I recal= l there being similiar code on gotdotnet.com sonewhere too.=0A=0A=0A----- O= riginal Message ----=0A=0AFrom: Jos=E9 Joye =0A=0ATo:= log4net-user@logging.apache.org=0A=0ASent: Thursday, January 18, 2007 1:54= :06 PM=0A=0ASubject: Wrapping Log4Net in a Facade --> incorrect LocationIn= fo shown for file, methods....=0A=0A=0A=0A Hello,=0A=0A =0A=0A We = are trying the Log4Net in our projects. However, for different reasons, we= want to expose it to our developers through a Tracing/Error class facade.= =0A=0A Doing so, we face the following problem:=0A=0A =0A=0A Whenever an = Appender print information about LocationInfo (File, line, Method,....). I= t will take information related to the caller of the Log4Net method (which= is the facade in our case).=0A=0A =0A=0A Is there any way to tell Log4Net= not to walk more more level on the stackTrace so as to retrieve the infor= mation?=0A=0A =0A=0A Thanks a lot!=0A=0A =0A=0A - Jose=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A