Wednesday, February 18, 2009

Java Logging!@*#%$*(%!

Hasn't this been done to death?

So why can't I leave it alone?

'Cause every time I go to use a logging framework, typically for some debugging, I'm amazed at how overly-complicated and under-featured they are.

So, I typically end up using log4j, or something wrapping/derived from it. Then I go to do some debugging and think, "Oh, that's a bit expensive to leave in there, I'll have to put a logger.isDebugEnabled() on the front of it" - and then I've just doubled the amount of space in my debugging code in order to be more efficient.

So I write a wrapper around Log4J that takes varargs and only concats them if debugging is on and Voila!, yet another custom logging framework.

Can anyone tell me what they use, that is succinct and efficient?

No comments:

Post a Comment