This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 6fe1b5e BZ 63286: Inconsistencies between AccessLogValve and mod_log_config 6fe1b5e is described below commit 6fe1b5e84c443de6dcbcdba20a7a674fe5ca265a Author: Michael Osipov <micha...@apache.org> AuthorDate: Thu Mar 5 09:24:19 2020 +0100 BZ 63286: Inconsistencies between AccessLogValve and mod_log_config Update documentation to reflect code changes aligned with HTTPd. --- java/org/apache/catalina/valves/AbstractAccessLogValve.java | 10 ++++++---- webapps/docs/config/valve.xml | 10 +++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/java/org/apache/catalina/valves/AbstractAccessLogValve.java b/java/org/apache/catalina/valves/AbstractAccessLogValve.java index 1f00595..9776097 100644 --- a/java/org/apache/catalina/valves/AbstractAccessLogValve.java +++ b/java/org/apache/catalina/valves/AbstractAccessLogValve.java @@ -87,9 +87,9 @@ import org.apache.tomcat.util.net.IPv6Utils; * <li><b>%u</b> - Remote user that was authenticated * <li><b>%U</b> - Requested URL path * <li><b>%v</b> - Local server name - * <li><b>%D</b> - Time taken to process the request, in millis + * <li><b>%D</b> - Time taken to process the request, in microseconds * <li><b>%T</b> - Time taken to process the request, in seconds - * <li><b>%F</b> - Time taken to commit the response, in millis + * <li><b>%F</b> - Time taken to commit the response, in milliseconds * <li><b>%I</b> - current Request thread name (can compare later with stacktraces) * <li><b>%X</b> - Connection status when response is completed: * <ul> @@ -120,6 +120,8 @@ import org.apache.tomcat.util.net.IPv6Utils; * <li><code>%{xxx}s</code> xxx is an attribute in the HttpSession * <li><code>%{xxx}t</code> xxx is an enhanced SimpleDateFormat pattern * (see Configuration Reference document for details on supported time patterns) + * <li><code>%{xxx}T</code> xxx is the unit for the time taken to process the request + * (see Configuration Reference document for details on supported units) * </ul> * * <p> @@ -1333,8 +1335,8 @@ public abstract class AbstractAccessLogValve extends ValveBase implements Access private final boolean millis; /** - * @param micros <code>true</code>, write time in micros - %D - * @param millis <code>true</code>, write time in millis, + * @param micros <code>true</code>, write time in microseconds - %D + * @param millis <code>true</code>, write time in milliseconds, * if both arguments are <code>false</code>, write time in seconds - %T */ public ElapsedTimeElement(boolean micros, boolean millis) { diff --git a/webapps/docs/config/valve.xml b/webapps/docs/config/valve.xml index daaa77d..4afdbc0 100644 --- a/webapps/docs/config/valve.xml +++ b/webapps/docs/config/valve.xml @@ -304,9 +304,9 @@ <li><b>%u</b> - Remote user that was authenticated (if any), else '-'</li> <li><b>%U</b> - Requested URL path</li> <li><b>%v</b> - Local server name</li> - <li><b>%D</b> - Time taken to process the request in millis.</li> - <li><b>%T</b> - Time taken to process the request, in seconds.</li> - <li><b>%F</b> - Time taken to commit the response, in millis</li> + <li><b>%D</b> - Time taken to process the request in microseconds</li> + <li><b>%T</b> - Time taken to process the request, in seconds</li> + <li><b>%F</b> - Time taken to commit the response, in milliseconds</li> <li><b>%I</b> - Current request thread name (can compare later with stacktraces)</li> <li><b>%X</b> - Connection status when response is completed: <ul> @@ -335,6 +335,10 @@ remote (client) port (<code>xxx=remote</code>)</li> <li><b><code>%{xxx}t</code></b> write timestamp at the end of the request formatted using the enhanced SimpleDateFormat pattern <code>xxx</code></li> + <li><b><code>%{xxx}T</code></b> write time taken to process the request using unit <code>xxx</code> + where valid units are <code>ms</code> for milliseconds, <code>us</code> for microseconds, + and <code>s</code> for seconds. <code>%{s}T</code> is equivalent to <code>%T</code> as well + as <code>%{us}T</code> is equivalent to <code>%D</code>.</li> </ul> <p>All formats supported by SimpleDateFormat are allowed in <code>%{xxx}t</code>. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org