aspose file tools*
The moose likes Struts and the fly likes Logging in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Logging in Struts" Watch "Logging in Struts" New topic
Author

Logging in Struts

amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
What is the best approach for logging in struts .Log4j or any other framework
is suitable for struts application.
Thanks
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi dmay,
I believe log4j is the easiest and the best way for logging.

Regards,
Roshani


Regards,<br />Roshani
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Hello,

Though Struts uses Apache Common Logging framework to take care of its logging, I would prefer Log4j (logging.apache.org/log4j/docs/) for its support for different layouts.

Rgds,

Seetesh
amit sharma
Ranch Hand

Joined: Jul 19, 2006
Posts: 129
Any other advantage of Log4j.Which is better in terms of performance.
Thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Apache commons logging is a kind of wrapper for other logging frameworks. If you've initialized Log4j logging in your application, Apache commons logging will sense it and use Log4J as the logging implementation.

Here's a quote from the home page:
The Logging package is an ultra-thin bridge between different logging implementations. A library that uses the commons-logging API can be used with any logging implementation at runtime. Commons-logging comes with support for a number of popular logging implementations, and writing adapters for others is a reasonably simple task.

[ October 05, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging in Struts