What logging API do you use? Follow Norris Shelton Created April 24, 2007 22:24 Do you guys have any preference for one logging API over another?
I assume you mean ouside IDEA, in general applications?
Usually clogging. It's more-or-less a stardard, for better or for worse.
I normally just use log4j directly, it seems to be used by pretty much everything, directly or indirectly. I'd like to take a look at slf4j, but haven't got around to it yet. I'm working with OSGi now, and logging is a pain, so I'm hoping that slf4j will make it easier.
It looks like I will be looking at LogBack via the native SLF4J api.
i've personnaly always used log4j
When I've asked this before, I mostly hear some combination of log4j, commons-logging (usually as a light wrapper for log4j), and less common stuff. The one thing I never hear of anyone using is the stock java.util.logging functionality.
I hadn't heard of LogBack, but that looks like the combination I'd be looking at as well. I'd be interested to know what you think when you try it.
I always use standard java logging, and avoids log4j like the plague.
It seems pretty easy. The default configuration (without a config file) logs everything to the console. I need to work on using a configuration file, but all looks very good.
Dave Griffith wrote:
I prefer to use java.util.logging, it has more levels of debugging so
that when you turn up the debug it doesn't flood you with stuff even
less relevant than what you need. Plus you don't need an extra jar file
on the path to do something that can already be done.