On Fri, 2004-03-26 at 15:55, Simon Kitching wrote: > Hi All, > > I've just completed a patch for SMTPAppender which uses NDC to filter > the messages in the generated email so that only buffered messages which > are "related" to the triggering event are included in the email. > > The app I need this feature for processes multiple message types > concurrently in different threads, and if an error for message X occurs > I want the resulting email to exclude debug/info/warn/etc messages about > unrelated messages being processed at the same time, and about messages > previously processed by the same thread which were not followed by a > triggering event. By using a modified SMTPAppender, and setting the NDC > to the "message id" when starting processing of a specific message, I > get the desired effect. > > Note that this is not the same as filtering, which decides which > messages go into the buffer. [Potentially, this could be implemented by > invoking a "post-trigger" filter object rather than hard-coding the > behaviour into the appender as shown below]. > > Is there any interest in including this feature in log4j?
I didn't get any replies from the original posting. I hope no-one minds this repost; I just want to make sure it didn't just get missed. I understand that there would be a reasonable amount of work to knock the code in my original posting into shape. If people here are interested in the patch, I am willing to do so. Here's a link to the complete original post: http://marc.theaimsgroup.com/?l=log4j-dev&m=108027331108040&w=2 Cheers, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
