Bug 60508 - AccessLogValve using %D doesn't log milliseconds for HTTP/2
Summary: AccessLogValve using %D doesn't log milliseconds for HTTP/2
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Connectors (show other bugs)
Version: 8.5.8
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-22 09:39 UTC by Kenny Colliander Nordin
Modified: 2017-01-02 15:46 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenny Colliander Nordin 2016-12-22 09:39:22 UTC
The last parameter %D in my example should output "Time taken to process the request, in millis".

server.xml configuration in a Host element:

<Valve className="org.apache.catalina.valves.AccessLogValve" prefix="access-" suffix=".log" pattern="%h %l %u %t '%r' %s %b %D" />

Log output for HTTP/2 requests:
85.x.y.z - - [22/Dec/2016:09:51:49 +0100] 'GET / HTTP/2.0' 200 1165 1482396709364

Using connector org.apache.coyote.http11.Http11AprProtocol with upgrade protocol org.apache.coyote.http2.Http2Protocol

The value seems to be the UNIX timestamp instead for HTTP/2.0. HTTP/1.1 requests works as expected.
Comment 1 Remy Maucherat 2017-01-02 15:46:38 UTC
Fixed for 9M16 and 8.5.10.