I want to log information about my servlet each time it is called. I'm not sure how to set this up with Tomcat. As best I can tell, I need to add the following element,
<!-- Global logger unless overridden at lower levels -->
prefix="servlet." suffix=".log" timestamp="true" />
somewhere in my sever.xml file. I got this information from the following address: http://minaret.biz/tips/tomcatLogging.html
. If this is true, then where exactly should in place this element in server.xml?
This has me a little confused as it conflicts with the information I read at, http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaie/rzaietomcat.htm
. I believe it implies that a log file called, servlet.log, will automatically be created.
Which is true? Is either true? Or are they both true but different approaches?
Lastly, once I've told Tomcat about logging my servlet, will do some automatic logging of sevlet information or will have to tell it exactly what to log? And if I tell it what to log, do I just use the following method?
Thank you, in advance, for help on this issue.