File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes Java logging suggestions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java logging suggestions" Watch "Java logging suggestions" New topic

Java logging suggestions

Darrin Cartwright
Ranch Hand

Joined: Dec 27, 2002
Posts: 107
Hello All!

The application I am currently working on uses very basic logging capabilities. All logging is accomplished either with System.out.println() calls, which are redirected to a file when the app starts with the System.setOut() method, or a custom logging class running in it's own thread which provides some basic formatting, file handling, etc. This works, which is about the best thing you can say about it. So, I'm looking into using one of the logging APIs. I've found log4j, and the java.util.logging API. Does anyone have any advice on either of these APIs, or maybe an API I haven't run across? We currently are using Java 5, and on the way to 6.



Life is good on the Ponderosa,<br />but mind where you step.
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

log4j and java.util.logging have been functionally identical for my purposes. I say flip a coin. You can use the Jakarta Commons Logging component to make it easy to switch between logging implementations if you are worried about making the wrong choice.

[How To Ask Questions On JavaRanch]
Darrin Cartwright
Ranch Hand

Joined: Dec 27, 2002
Posts: 107
I think you're right. The only difference I can come up with is having to bundle the log4j with my app.

Thanks for the opinion Joe!
I agree. Here's the link:
subject: Java logging suggestions
It's not a secret anymore!