wood burning stoves 2.0*
The moose likes Java in General and the fly likes New to logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "New to logging" Watch "New to logging" New topic
Author

New to logging

David Duran
Ranch Hand

Joined: Feb 11, 2002
Posts: 122
I need to implement some type of logging scheme for things like database transactions, method calls, etc., and possibly things like stack traces if an error occurs. Multiple RMI server apps on a single machine would be logging to a single file on the same machine.
I've never done logging. To me, the simplest form would be to simply just write to a file hahaha. But I've come across things like log4j and the logging package in jdk 1.4. Does anyone have some input if either of those 2 might be of use or should I stick to the simple idea of writing to a file?
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
I use log4j. That works pretty good. Easy to implement and great for debugging. In fact that is what I use it for is debugging. I have one instance per class implemented for debugging purposes. FYI .. works good
Dale


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
David Duran
Ranch Hand

Joined: Feb 11, 2002
Posts: 122
I was looking into the jdk 1.4 java.util.logging feature but came across this interesting page java.util.logging vs log4j and decided to give a read on the documentation for log4j.
So far so good, except that it's so involved I have to look at all the different ways to implement it for what I need it for.
 
Consider Paul's rocket mass heater.
 
subject: New to logging
 
Similar Threads
Best practices to do logging within a JSF application?
Maintaining Unique Sessions in JSP
Part 2 Use Cases
Need ur Help!!!
How to use Log4j - single log file for 6 j2ee modules in a project