logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Drier" <peter.dr...@gmail.com>
Subject Re: plugins
Date Thu, 19 Jul 2007 14:29:56 GMT
James,

I originally thought the same about log4net plugins..   But it turned out
that they seem to be a method for injecting messages into the logging system
that came from somewhere else.

In your case, you've defined a new appender that happens to be in a separate
assembly.  The good news is you're done.  :)   All you need now is for your
config file to reference this new assembly in your appender directive, and
you're really done.  Log4net doesn't need anything other than the ability to
find your appender, and for it to follow the proper interfaces..

I have an appender that publishes messages to TibcoRV, and we use it as
such:

<appender name="TibcoAppender" type="Communication.PubSub.TibcoAppender,
HelloWorld">
       <threshold value="WARN"/>
</appender>

Next you could come up with an interesting name, and submit it to the group
for others to use (and for possible inclusion in future builds/releases)..
"De-duper"..  or maybe "UniqAppender"

Hope this helped,
Peter

On 7/19/07, James Wilkinson <jwexqm@gmail.com> wrote:
>
> I've written a forwarding appender that filters out sequential duplicate
> events. It's designed to be inserted in the chain before an SmtpAppender to
> prevent mail recipients being flooded with many identical mails. When the
> stream of dupes is over, the appender inserts a 'summary event' that
> describes how many duplicates were filtered out.
>
> During development, I copied and renamed ForwardingAppender.cs, added the
> new file to the log4net project and implemented the functionality I needed.
> Now that it's basically working, I am wondering if I can migrate it to use
> the plugin architecture of log4net. I'm imagining my main application using
> the vanilla 1.2.10 log4net assembly plus an assembly containing my plugin.
>
> I've found there to be little to go on really though regarding the
> intended use of plugins and examples - this being the only thread in the
> list history that seemed relevant...
> http://www.mail-archive.com/log4net-user@logging.apache.org/msg02192.html
> I wonder, having now read that and after looking at the included
> RemoteLoggingServerPlugin, whether plugins are acutally what I think they
> are.
>
> If anyone can give any input on any my musings above, then I'd be most
> grateful.
>
> James
>

Mime
View raw message