简体   繁体   中英

Apache httpd access logs or tomcat access logs

In our web application, which is deployed on tomcat server inside apache web server, we need to plot some metrics like count of specific API hits and latency on these APIs. In order to achieve it, we need to parse log files using something like grok.

Now, my main concern is understanding difference between apache access log and tomcat access log and choosing one of them. Any incoming request is first logged into apache access log and then tomcat access log. Then what is the difference between them, if there is single tomcat server deployed inside this apache web server. And which is the better candidate?

You really only need one of them although there isn't a 100% overlap (eg tomcat won't tell you the number of bytes received).

Here's the tomcat access log docs .

And here's the httpd access log docs .

You might have issues reading the logs depending on the user account you run tomcat under (which wants to read the logs) and the user account you run apache httpd under.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM