Forums Register Login

using log4J

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Logging is independent of any particular technology like JSF/JSP/DB2/Websphere. What problem are you facing?
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
 


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.
+Pie Number of slices to send: Send
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
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 906 times.
Similar Threads
Debugging Best Practices??
Log4j Configurations
EJB + log4j
Transitive dependencies
How can i add Log4j suppourt to my Application
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:43:55.