Saurabh Kedia
Saurabh Kedia

Reputation: 11

Access log pattern for Response time Undertow system- Wildfly 14.0.1

What is the access log pattern for logging the total response time to the request on undertow subsystem ?

<subsystem xmlns="urn:jboss:domain:undertow:7.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other">
            <buffer-cache name="default"/>
            <server name="default-server">
                <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
                <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
                <host name="default-host" alias="localhost">
                <access-log  prefix="access" pattern="%h %t %U%q %m %s %b %T"/>   <!-- use-server-log="true" -->
                    <location name="/" handler="welcome-content"/>
                    <http-invoker security-realm="ApplicationRealm"/>
                </host>
            </server>
            <servlet-container name="default">
                <jsp-config/>
                <websockets/>
            </servlet-container>
            <handlers>
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
            </handlers>
        </subsystem>

The %T is recording just a '-' in the logs. Please help.

Upvotes: 1

Views: 5164

Answers (2)

derdualist
derdualist

Reputation: 111

If you start undertow with Spring Boot, the properties are

server.undertow.options.server.record-request-start-time=true
server.undertow.accesslog.pattern=[...] %T

Upvotes: 0

wirnse
wirnse

Reputation: 1136

Here i found the following hint:

Time taken to process the request, in seconds. It won't work unless record-request-start-time is set to true, see %D above.

There is also a link how you can configure it. record-request-start-time

Upvotes: 4

Related Questions