• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using log4J

 
Ranch Hand
Posts: 399
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Logging is independent of any particular technology like JSF/JSP/DB2/Websphere. What problem are you facing?
 
Ayub ali khan
Ranch Hand
Posts: 399
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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.
 
Ayub ali khan
Ranch Hand
Posts: 399
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Seriously Rick? Seriously? You might as well just read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic