aspose file tools*
The moose likes Other Open Source Projects and the fly likes using log4J Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "using log4J " Watch "using log4J " New topic
Author

using log4J

Ayub ali khan
Ranch Hand

Joined: Oct 20, 2005
Posts: 379
    
    2
Hi,

I am trying to implement logging facility in my web application (JSF/JSP/DB2/) application will be deployed on Websphere application server. I will be thankful if any one can give me a sample hello world webapp which implements Log4J functionality on the above platform


Thank you.

Ayub.


SCEA part I,TOGAF Foundation
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
Logging is independent of any particular technology like JSF/JSP/DB2/Websphere. What problem are you facing?


Ping & DNS - updated with new look and Ping home screen widget
Ayub ali khan
Ranch Hand

Joined: Oct 20, 2005
Posts: 379
    
    2
Hi Ulf,

I implemented a simple login app as described here Is there a similar resource where I can try the jakarta commons logging api ?

Also which logging approach is better log4J vs commons


Thank you.
Ayub
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Also which logging approach is better log4J vs commons

I think you are confused. log4j is a logging framework i.e. it provides the mechanism to log messages from your code, plus a bunch of method to configure and control that logging process. Commons logging is a framework for logging frameworks. What that means is commons logging itself does not log. It delegates to a configurable logging framework (such as log4j) to log the actual messages. What it provides is an abstraction layer on top of the various logging frameworks so you don't need to worry about the differences between each logging framework.

It is generally better to use the more abstract API.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ayub ali khan
Ranch Hand

Joined: Oct 20, 2005
Posts: 379
    
    2
Hi Paul,

Thank you for your clear explanation. The point I got from it is as follows:

1) commons logging is the frame work for logging Frame works.

2)I understood that commons logging will delegate logging functionality to log4j or any other loging packages which are detected in the class path.

So the ensence is that log4j is good to use for logging ?

Thank you.

Best Regards
Ayub
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using log4J
 
Similar Threads
Transitive dependencies
Log4j Configurations
EJB + log4j
Debugging Best Practices??
How can i add Log4j suppourt to my Application