Coding and Dismantling Stuff

Don't thank me, it's what I do.

About the author

Russell is a .Net developer based in Lancashire in the UK.  His day job is as a C# developer for the UK's largest online white-goods retailer, DRL Limited.

His weekend job entails alternately demolishing and constructing various bits of his home, much to the distress of his fiance Kelly, 3-year-old daughter Amelie, and menagerie of pets.


  1. Fix dodgy keywords Google is scraping from my blog
  2. Complete migration of NHaml from Google Code to GitHub
  3. ReTelnet Mock Telnet Server à la Jetty
  4. Learn to use Git
  5. Complete beta release FHEMDotNet
  6. Publish FHEMDotNet on Google Code
  7. Learn NancyFX library
  8. Pull RussPAll/NHaml into NHaml/NHaml
  9. Open Source Blackberry Twitter app
  10. Other stuff

Log4Net Custom Appenders and the ActivateOptions Event

I've been working with Log4Net on and off now for several years. I've used most of the existing appenders, tweaked an appender here or there, but I'd not done any heavy lifting. That was until I started checking out the Gelf4Net appender.

Gelf4Net supports multiple transport mechanisms (currently UDP and AMQP), in the constructor the appender creates up an instance of each transport class and assigns these to two private fields, so that when it comes to appending log events, either can be used.  This isn't ideal, and I believe it's been done because Log4Net doesn't configure the appender (which transport to use) until after the class is constructed. So I've been scratching my head and Googling around to work out a solution, and I've uncovered the ActivateOptions method, which appears to exist exactly for this purpose. Let's see how this works out.


Categories: Hacking
Permalink | Comments (0)

Enterprise Logging and Alerting with Graylog2, RabbitMq and NEsper

Do you work with lots of software and need to know what it's all getting up to, when you need to know it? I work for a .Net house with over 10 years' worth of software under our belts, we totally have this problem.

Our full estate includes many small and large systems - Web services, Windows services, .Net web apps, MVC web apps... if it's Microsoft badged, we'll have one somewhere. Each of these systems currently logs to a mixture of database tables, flat text files, e-mail alerts - the whole thing is becoming increasingly difficult to manage.

This blog post will be the first in a series looking at an open source solution, involving Log4Net, RabbitMq, Graylog2, ElasticSearch and NEsper, with the following capabilities:

  • Aggregating logs from various distributed systems into a flexible and searchable persistent storage mechanism
  • A web front-end for querying and graphing the log data
  • A system capable of detecting abnormal or critical log patterns and alerting support staff


Categories: Architecture | Linux
Permalink | Comments (3)