From c500d8e7849b8c6e702a4b0a469df7bf11241c47 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 3 Aug 2022 19:39:40 +0100 Subject: [PATCH] Note need to record req start time to use %D with Undertow access log Closes gh-31103 --- .../spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc index 32f036368d..f588b520e6 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc @@ -398,8 +398,13 @@ Access logging for Undertow can be configured in a similar fashion, as shown in accesslog: enabled: true pattern: "%t %a %r %s (%D ms)" + options: + server: + record-request-start-time: true ---- +Note that, in addition to enabling access logging and configuring its pattern, recording request start times has also been enabled. +This is required when including the response time (`%D`) in the access log pattern. Logs are stored in a `logs` directory relative to the working directory of the application. You can customize this location by setting the configprop:server.undertow.accesslog.dir[] property.