Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

logging in Struts

Status
Not open for further replies.

samit700

Programmer
Sep 23, 2003
52
US
Hi,

I am using the log4j framework for logging in my application. I am specifying my own custom log file in the log4j.properties file. But somehow Struts logs so many of its own errors and debug messages to my log file. How does Struts discover the logger I define in my application. Also how do I turn the Struts debugging off since it is increasing the size of the log exponentially...

Thanks,
Samit
 
according to Sturts documentation

"Struts doesn't configure logging itself -- it's all done by commons-logging under the covers. The default algorithm is a search:

If Log4J is there, use it.
If JDK 1.4 is there, use it.
Otherwise, use SimpleLog. "

So if you have Log4J set up, it uses it. You can lower the log level for struts package in your log4j properties file

e.g.

log4j.logger.org.apache.struts=WARN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top