Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 6115 invoked from network); 19 Apr 2006 00:55:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2006 00:55:20 -0000 Received: (qmail 40008 invoked by uid 500); 19 Apr 2006 00:55:19 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 39855 invoked by uid 500); 19 Apr 2006 00:55:18 -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 39842 invoked by uid 99); 19 Apr 2006 00:55:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 17:55:18 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.207.136] (HELO web32205.mail.mud.yahoo.com) (68.142.207.136) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 18 Apr 2006 17:55:17 -0700 Received: (qmail 93538 invoked by uid 60001); 19 Apr 2006 00:54:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1e4WrtB3NqvOtLTlXHfpO0GyFs+zpsNQVnR0lkyzPvHuy1eHV4FPxaw2PKD3rw0qQmHoiaMSEjyaGI25mYD87y5o5rv/EABy35tV+HlyjWmFEdjrS2JDLBl6wPrW3s4+sSli1saIefVs1ZiwKECPy5B2vUSHkWt7rPCqShiOGyU= ; Message-ID: <20060419005456.93536.qmail@web32205.mail.mud.yahoo.com> Received: from [65.24.255.41] by web32205.mail.mud.yahoo.com via HTTP; Tue, 18 Apr 2006 17:54:56 PDT Date: Tue, 18 Apr 2006 17:54:56 -0700 (PDT) From: Ron Grabowski Subject: Re: Oh where, oh where has my little RenderException() gone? To: Log4NET User In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I thought that passing just the Exception into one of the ILog methods: log.Debug(ex); would allow the Exception to be handled by the DefaultRenderer? On a slightly unrelated sidenote, sometimes I think it would be nice to expose the concept of the renderer in ILog. We already do something similiar for DebugFormat: IList list = new ArrayList(); list.Add("Hello"); list.Add("World"); log.DebugRenderer("Contents of list: ", list); DEBUG - Contents of list: {Hello, World} Dumping out objects without any kind of message usually doesn't help much: DEBUG - {Hello, World} Having to split the message into two messages (one that contains the message and one that contains the actual object I'm rendering) clutters the log file and there's no guarantee that the messages will appear after each other: DEBUG - Contents of list: INFO - The current date is 4/18/2006 INFO - Tomorrow's date will be 4/19/2006 DEBUG - {Hello, World} The nice thing about the renderer is that it pretty prints a lot of things (IEnumerable, ICollection, IList, IDictionary etc.) without me having to write my own dumpList(list) function: log.DebugFormat("Contents of list: {0}", dumpList(list)); The only thing I don't like about the DebugRenderer method is the "erer" at the end :) Maybe just DebugRender? --- "Zimney, Christopher M." wrote: > I use the old RenderException method in a class that derives from > DefaultRenderer to get Exceptions to into a workable XML format. > > Looking through 1.2.9 stuff, I see that this has gone far, far away > and > isn't listed in the breaking changes section of the docs. Was anyone > else using this method and found a work around without having to > customize log4net source? > > override protected string RenderException (RendererMap rendererMap, > Exception e) > > Sadly, > > chris >