views:

31

answers:

1

I'm pretty new to Log4Net (I used log4j), and I'm wondering the best strategy for sending error logs (on Error or Fatal Error) to a URI. The server's already set up and listening.

I was going to risk re-inventing the wheel and extend the AppenderSkeleton class to create a POSTAppender. Is there any easier way to do it?

+2  A: 

There is not an easier way to do it. Extending AppenderSkeleton is fairly easy and I'd recommend trying your hand at it. There's only one method you're required to override, Append(LoggingEvent loggingEvent).

For your specific Error or Fatal requirements, you could use a threshold setting or a Filter in your log4net configuration.

For reference, there is a list of built-in appenders for log4net.

Michael Greene
I thought maybe there was an appender I was missing, because I couldn't find any! Thank you for your answer :)
calico-cat
Feel free to accept this answer if you found it helpful :)
Michael Greene