Skip to content

MikeBevers.be

Putting it out there…

Archive

Archive for September, 2010

Context

Unfortunately, there is no easy way to create a fully qualified XML file. The problem is that a rolling file appender writes its entries sequentially. As we all know, an XML file has to start with opening a root element and end with closing the root element.

Of course, we can always provide some kind of workaround.

continue reading…

Context

I wanted log4net to write its log entries in a SQL Server database. log4net’s AdoNetAppender would have done the trick. But, there are three requirements I need to keep in mind.

  1. I have to use my logging framework
  2. The connectionstring has to be stored the app.config or web.config
  3. The machine’s hostname has to be added to the log entry

continue reading…

What is log4net

If you have never heard about log4net, this article isn’t immediately suited for you. Dimitri Clement wrote a few articles about log4net and how to use it:

You can also visit the log4net website.

continue reading…

Context

Every developer knows that managing your app.config or web.config isn’t an enjoyable task. When you’re moving your application from one environment to another, you will need to change some variables. Maybe you’re working with automatic builds, and so on.

Since Visual Studio 2010 you have a new feature: “Config transformations”. Because I’m still working with Visual Studio 2008, I can’t use it. That’s why I wrote my own config transformer.

continue reading…