This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new fe2c3f1f27 Simplify - based on PR #1002 by Fabian Hahn
fe2c3f1f27 is described below
commit fe2c3f1f27b05621e0d9f777d00833d2c448f807
Author: Mark Thomas <[email protected]>
AuthorDate: Sat May 2 15:36:38 2026 +0100
Simplify - based on PR #1002 by Fabian Hahn
---
.../apache/catalina/valves/AbstractAccessLogValve.java | 17 +++--------------
webapps/docs/config/valve.xml | 2 +-
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/java/org/apache/catalina/valves/AbstractAccessLogValve.java
b/java/org/apache/catalina/valves/AbstractAccessLogValve.java
index e6b05a139b..1ea1877569 100644
--- a/java/org/apache/catalina/valves/AbstractAccessLogValve.java
+++ b/java/org/apache/catalina/valves/AbstractAccessLogValve.java
@@ -1628,17 +1628,6 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
this.style = style;
}
- /**
- * Creates a new ElapsedTimeElement that will log the time in the
specified style.
- *
- * @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) {
- this(micros ? Style.MICROSECONDS : millis ? Style.MILLISECONDS :
Style.SECONDS);
- }
-
@Override
public void addElement(CharArrayWriter buf, Request request, Response
response, long time) {
style.append(buf, time);
@@ -2198,7 +2187,7 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
} else if ("fracsec".equals(name)) {
return new
ElapsedTimeElement(ElapsedTimeElement.Style.SECONDS_FRACTIONAL);
} else {
- return new ElapsedTimeElement(false, false);
+ return new
ElapsedTimeElement(ElapsedTimeElement.Style.SECONDS);
}
default:
return new StringElement("???");
@@ -2223,7 +2212,7 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
case 'B':
return new ByteSentElement(false);
case 'D':
- return new ElapsedTimeElement(true, false);
+ return new
ElapsedTimeElement(ElapsedTimeElement.Style.MICROSECONDS);
case 'F':
return new FirstByteTimeElement();
case 'h':
@@ -2247,7 +2236,7 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
case 't':
return new DateAndTimeElement();
case 'T':
- return new ElapsedTimeElement(false, false);
+ return new
ElapsedTimeElement(ElapsedTimeElement.Style.SECONDS);
case 'u':
return new UserElement();
case 'U':
diff --git a/webapps/docs/config/valve.xml b/webapps/docs/config/valve.xml
index a44f451e0e..285609a203 100644
--- a/webapps/docs/config/valve.xml
+++ b/webapps/docs/config/valve.xml
@@ -287,7 +287,7 @@
<li><b><code>%A</code></b> - Local IP address</li>
<li><b><code>%b</code></b> - Bytes sent, excluding HTTP headers, or '-' if
zero</li>
<li><b><code>%B</code></b> - Bytes sent, excluding HTTP headers</li>
- <li><b><code>%D</code></b> - Time taken to process the request in
microseconds</li>
+ <li><b><code>%D</code></b> - Time taken to process the request, in
microseconds</li>
<li><b><code>%F</code></b> - Time taken to commit the response, in
milliseconds</li>
<li><b><code>%h</code></b> - Remote host name (or IP address if
<code>enableLookups</code> for the connector is false)</li>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]