I am using tomcat log to log the access info and the definitions of %D and %F in official doc is
%D - Time taken to process the request, in millis
%F - Time taken to commit the response, in millis
I am confused by this two definitions, does the time of %F includes the time of %D?
Thanks in advance!
public class AccessLogValve extends ValveBase implements AccessLog. Implementation of the Valve interface that generates a web server access log with the detailed line contents matching a configurable pattern.
This file is located in the logs directory below the Tomcat root directory. This log is the system's output log, which also consists of standard error messages. These files are saved daily (MM-DD-YYYY) with the date appended to the name of the data. Moreover, this log file persists during the functioning of the server.
%D includes %F plus any network time
There is a bit more information in the API Doc https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/AccessLogValve.html
AccessLogValve.ElapsedTimeElement write time taken to process the request - %D, %T
AccessLogValve.FirstByteTimeElement write time until first byte is written (commit time) in millis - %F
In the Bugzilla entry for %F it says https://bz.apache.org/bugzilla/show_bug.cgi?id=55102
Tomcat's AccessLogValve is able to report the time taken to send an entire request using %D. This is the total processing time and may be affected by network conditions. It is sometimes useful to be able to record the time taken by the server to prepare the response and send the first content to the client.
Attached is a patch that records the time the response is committed and then allows that to be reported in the access log using a '%F' pattern (which is the same as used by the mod-log-firstbyte module for HTTPD).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With