Hi, everyone.
Now Undertow AccessLogHandler is not supported Response time(%D/%T), right?
I simply implemented it, but I'm not sure..
https://github.com/emag/undertow/commit/6401d61e3fcb5ce739ce4f30ae0d6fb3a...
My code is
1) Add startTime:long field in HttpServerExchange
2) Initialize startTime and assign System.currentTimeMillis to it in
HttpServerExchange#<init>
3) Create ResponseTimeAttribute and its readAttribute return
(System.currentTimeMillis - exchage.getStartTime)
Is it too simple?
-----
I checked handler chain stack trace on WildFly Beta1.
(default I/O-3)
io.undertow.server.handlers.resource.ResourceHandler.handleRequest(ResourceHandler.java:76)
(default I/O-3)
io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:90)
(default I/O-3)
io.undertow.server.handlers.accesslog.AccessLogHandler.handleRequest(AccessLogHandler.java:93)
[...]
<Some Handlers> -> AccessLogHandler -> PathHandler -> ResourceHandler
If PathHandler and ResourceHandler(or another process) take a long time, my
idea doesn't work.