Wednesday, June 23, 2010

Programmatic log4net configuration at runtime

I've been looking for a way to enable/disable a log4net appender at runtime through code. Doing so would remove the need to remote to the production web server to alter the logging config file.

The blog post Tweaking log4net Settings Programmatically has a extension method to perform actions on certain types of appender.