Logging

I was poking around for a logging framework today. I wanted something very easy to use. Anything too difficult and people would just revert to Debug.WriteLine and MessageBox debugging pretty quickly. The idea here is to make it so painless that using the logging framework would be every easier than the normal methods.

I looked at log4net but my head began hurting within moments. It looked very flexible, but it was just too much work to implement and use. I’m not saying it was insurmountable, but it was more complex than I wanted.

What I ended up using is the .NET Logging Framework from TheObjectGuy. It was very simple to setup, even easier to use. I don’t think it is quite as flexible as log4net, but it does everything I needed (and more). Within minutes I had it logging my application to the Event Log, Email, and outputting a .log file.

The documentation on the other hand was a bit sparse. Nothing too bad, but it could/should be a lot better than it is. And there isn’t a single sample of how to use it (the only sample is a log reader, not something I really care about). It is simple enough however that these two issues don’t really impede very much.

Posted: Tuesday, January 20, 2004 4:38 PM by MarcLaFleur with 4 comment(s)

Comments

# re: Logging @Tuesday, January 20, 2004 5:30 PM

Hey Marc. I can't help myself. Here is a very famous logger from Vermont! http://www.thelogger.com/thelogger.html hee hee

julie lerman

# re: Logging @Tuesday, January 20, 2004 5:47 PM

Thanks for the link Marc.

Paul Wilson

# re: Logging @Tuesday, January 20, 2004 9:08 PM

You'll find samples here.

The Object Guy

# re: Logging @Tuesday, January 20, 2004 10:34 PM

Yes, I did see those samples. But they fail to cover everything. Only a small fraction of the logging interfaces are mentioned. There is no mention of the windows Event Log interface for example.

Real documentation of each object and their methods would be a real enhancement.

But again, that is my only issue. Otherwise it is one heck of a good library. Congrats.

Marc LaFleur

Leave a Comment

(required) 
(required) 
(optional)
(required)