subscribe-button feedburn rss

Popular Posts

Twitter Appender with Log4Net.

View all posts by Paul Anthony

For those ASP.NET developers amongst you who don’t know what log4net is, it is the best logging platforms for code monkey’s there is. It uses various appender structures to send log messages to different protocols, e.g. you can send your log messages to email, or to any TCP port, or to a file or to a database. It also allows configuration via web.config, so you can change the appender format easily.

The problem we were having at work is that the log messages from SQL server need formatted, and there’s not always a database handy on the machine that is sending the messages. Writing to text files wouldn’t really help, because its a remote machine, and we dont have access to it.  Also the email appender was starting to bog down our own server significantly with LOADS of messages coming from it. The resulting slow down in receiving the error messages was a right royal pain in the rear, and made debugging that bit harder as the messages weren’t being delivered instantly.

So - I thought, what better way to solve the problem than to send the information to a twitter account, so we could log in, and view the messages on a web page, or alternatively subscribe to the log messages via RSS feeds. Perfect.

However just before I jumped in and started coding a Twitter Appender for log4net,  (twitter offer an API which could be talked to from the Appender) I thought, well hey - surely there must be a way to tweet updates via email? And sure enough, twitterMail provides a dedicated email account to link your twitter account with an email account.  So an Email Appender could be used out of the box - the wheel didn’t need reinvented, and it offers a perfect way to get log message from .NET to RSS.

Share the Love

No comments, leave your comment or trackback.

Leave us your thoughts.