Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log4j versus Apache Commons logging

 
gyanendra ojha
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to implement Logging in my Struts Application. I have two options for logging "Log4j and Apache commons Logging" .
Please, suggest me which one is the best option for a Struts application.
and why ?

please, reply as fast as you can.
Thannks in Advance.
 
Joe Ess
Bartender
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by gyanendra ojha:
please, reply as fast as you can.


Please, Ease Up. We're all volunteers here, answering questions in our spare time.
As for your question, Apache Commons Logging is a wrapper around java.util.logging, Log4j and others. If you don't know which to choose, Apache Commons Logging is the safe choice since you can change the underlaying logger without rewriting your code.
Personally, I always use Log4j for no other reason than it works for what I need it to do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic