Link below details of access log configuration on tomcat, this could vary depending on the type of webserver used. But every webserver would have a access log by default.
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Access_Log_Valve
All different types of valves supported by Tomcat, most useful of it all is "Request Dumper" valve (dumps all request detail) & "Access Log" Valve.
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html#Request_Dumper_Valve
Example, below configuration (%D %T) will log response time for a request & timestamp of the request.
Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".txt" pattern="%D %T"
Lot of tools can help you analyze the access logs & provide more insight of the usage response time etc.
http://www.nltechno.com/awstats/awstats.pl?config=destailleur.fr
Conclusion: We all know it's mandatory for a web server to have an access log,
but the good part is this can greatly ease performance study & tune
your web application.
No comments:
Post a Comment