I've worked with logging in
Java years ago, but now I wanted a better solution. At that time I worked with java.util.logging and read about Log4j, and now I see there's Jakarta Commons Logging too. I'd be very thankful if somebody more experienced could suggest me which to choose.
My main needs are:
1) Easy to use. During development, if I wanna quickly
test the content of an object, instead of using System.out I can just use logger.finer("test01 "+object.toString())
2) Easy to configure. By my own code (and not some xml or property file I must put in a very specific folder), I set its OutputStream to some txt file I created, or just route its logs to stdout if I'm inside Eclipse, or just shut lower levels out, or route higher levels logs to 1 file and lower levels logs to another file.
3) Be able to format its output. Once in production, I'd like to use XML to format logs (in case someday I need to prepare some report based on these logs, it will be easy to read and process them), and use XSL to format it into XHTML for easy viewing.
When I read about Log4j years ago I didn't like it, because it didn't seem to have any better feature than java.util.logging, but I don't know how it is now. I'll read about Jakarta Logging to see if it's worthy.