Sunday, February 1, 2009

Logging Frameworks

There are several logging frameworks available for the .NET development community. One of the more popular ones is Log4Net. Like many things in life, this framework has gotten more popular because of its popularity--kind of like a celebrity being famous for being famous.

One of the framework's problems, however, is its complexity. Looking at the size of the DLL alone will tell you that. (If you write a relatively small application, the logging DLL will be larger than your application!)

Here's a link that really cracked me up. This guy thinks that spending 8 hours to successfully implement and configure Log4Net is amazing. (Amazing in that it only took 8 hours.) No, he isn't joking.

That's ridiculous!

Here's a logging framework that makes sense. I noticed several other postings across the net that referred to The Object Guy's Logging Framework. It may not be as popular as the other framework, but it looks like people who have compared them--at least from what I've read--prefer The Object Guy's Logging Framework. This is an example of what I mean. And here's what the author of the framework thinks.

And check out this review: he says it is the best logger ever.

And it sure won't take 8 hours to figure out. It's more like 8 minutes.

Take the challenge yourself: if you haven't used either framework, spend 15 minutes with each one. Afterwords, decide which one you'd prefer to spend more time with. I'd bet 9 out of 10 people will choose The Object Guy's Logging Framework.

5 comments:

  1. The last gig I had, we used The Object Guy's Logging Framework. It rocked!

    I'm forced to use Log4Net at my current job. After banging my head against a wall for a while, I eventually got everything to work. Once it's all set up and running, using it isn't too bad. But it doesn't have anything on The Object Guy's. And I agree that Log4Net is way too big for just a logging framework.

    The next time I get to decide on the framework, no doubt it will be The Object Guy's. It's lightweight, flexible, and makes sense in how you use it.

    ReplyDelete
  2. Yeah, I wish I knew about The Object Guy's logging framework before I built my cabin. 8 minutes to set up the framework? Man, I must have spent 8 months!

    ReplyDelete
  3. Pretty awesome that such a relatively new blog is being posted about TOG's logging packaged.

    I also concur, TOG's logging framework is much easier to use than log4net.

    ReplyDelete
  4. The logging framework of the Object Guy is simply excellent. It's easy to understand, easy to use, and easy to extend. And it already has 99% of everything you'll need right out of the box! It might not be very popular now, but I wouldn't be surprised if that changed anytime soon :)

    ReplyDelete
  5. How do i log to sql server?
    thanks

    ReplyDelete

Please tell me what you really think.