

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
4 messages in org.apache.logging.log4net-userRe: log4net duplicate filtering| From | Sent On | Attachments |
|---|---|---|
| James Wilkinson | Aug 8, 2007 2:43 am | |
| Ron Grabowski | Aug 8, 2007 4:30 am | |
| James Wilkinson | Aug 8, 2007 4:40 am | |
| Jerry Shea | Aug 9, 2007 4:45 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: log4net duplicate filtering | Actions... |
|---|---|---|
| From: | James Wilkinson (jwe...@gmail.com) | |
| Date: | Aug 8, 2007 4:40:01 am | |
| List: | org.apache.logging.log4net-user | |
ah, gmail being cleverer than me and making a link without asking me - the text is right, just the link got out of sync with reality somehow. Here it is again...
http://www.idiots.org.uk/log4net/DupeFilteringForewardingAppender_08-08-07.txt
On 8/8/07, Ron Grabowski <rong...@yahoo.com> wrote:
HTTP 404 - File not found
----- Original Message ----
From: James Wilkinson <jwe...@gmail.com>
To: Log4NET User <log4...@logging.apache.org>
Cc: "jerr...@gmail.com" <jerr...@gmail.com>
Sent: Wednesday, August 8, 2007 4:43:24 AM
Subject: log4net duplicate filtering
Hi,
I wanted to post the code I'd written for duplicate filtering a couple of weeks ago, but got distracted with some other work. After noticing the recent messages about duplicate filtering, I just figured that posting it in its current state might be of use to people.
It's a modified forwarding appender that does duplicate event filtering with a summary message inserted after the series of duplicate events has completed. I started off trying to implement it as a filter, but hit the problem of not being able to insert the summary message into the stream.
here's the source...
http://www.idiots.org.uk/log4net/DupeFilteringForewardingAppender_08-08-07.txt
Typical usage would be something like this...
<!-- use this forwarding appender as a dupe filter which then passes on to the console -->
<appender name="DupeFilteringForwardingAppender" type=" log4net.Appender.DupeFilteringForwardingAppender " >
<appender-ref ref="ConsoleAppender" />
<FlushTimeout value="3" />
</appender>
FlushTimeout (integer seconds) - see the comment in the source for the public property for how this works.
There are a whole load of things I'm not really sure I've done very well. The name of the thing for a start. The message fingerprinting might be more efficiently done as a checksum and from what I know, I think the reliance on the .net 2.0 generic-based list probably isn't in the spirit of the log4net coding standards. The hard-coded way that event fingerprints are built up feels like it needs thought. Anyway, it's maybe a start.
Also, thanks to Peter for clearing up my misconception about log4net plugins.
James







