Tuesday, December 13, 2005

Simple logging improvement

No matter how clever you are about logging, you will run in to problems in production where you need more information. Often times, I'll resort to access logs to try to understand more. I recently made two changes to the default access log format in Tomcat which have drastically increased the utility of these logs. I added session ID (%S) and "Time taken to process the request" (%D). If you take care to log session ID in your normal logs, you'll have a nice "foreign key" into the access logs.

No comments: