问题原文
原帖链接 · Kevin Meredith · CC BY-SA 3.0
How can I log Apache's performance, i.e. how it takes to process a request? Similar to Tomcat's Valve concept, I'd like to add this logging on Apache to identify a bottleneck on my web app.
I'm using Apache and Tomcat via mod_jk.
已采纳解答
原帖链接 · Mike · CC BY-SA 4.0
You have to create a new log format that adds on response time.
LogFormat "\"%{%Y-%m-%d %H:%M:%S}t\" %V %m \"%U\" \"%q\" %{Content-Type}o %s %B %O %D" responsetime
CustomLog "/var/log/apache2/responsetime.log" responsetime
The %D adds the response time in microseconds to the log. So you can always make your own format for the access log just include the %D somewhere in the log
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
