markt-asf commented on code in PR #721:
URL: https://github.com/apache/tomcat/pull/721#discussion_r1572301203
##########
java/org/apache/catalina/valves/AbstractAccessLogValve.java:
##########
@@ -1756,10 +1776,14 @@ protected AccessLogElement
createAccessLogElement(String name, char pattern) {
return new DateAndTimeElement(name);
case 'T':
// ms for milliseconds, us for microseconds, and s for seconds
- if ("ms".equals(name)) {
- return new ElapsedTimeElement(false, true);
+ if ("ns".equals(name)) {
+ return new
ElapsedTimeElement(ElapsedTimeElement.Style.MILLISECONDS);
Review Comment:
I think you want `NANOSECONDS` here.
##########
java/org/apache/catalina/valves/AbstractAccessLogValve.java:
##########
@@ -1756,10 +1776,14 @@ protected AccessLogElement
createAccessLogElement(String name, char pattern) {
return new DateAndTimeElement(name);
case 'T':
// ms for milliseconds, us for microseconds, and s for seconds
- if ("ms".equals(name)) {
- return new ElapsedTimeElement(false, true);
+ if ("ns".equals(name)) {
+ return new
ElapsedTimeElement(ElapsedTimeElement.Style.MILLISECONDS);
} else if ("us".equals(name)) {
- return new ElapsedTimeElement(true, false);
+ return new
ElapsedTimeElement(ElapsedTimeElement.Style.MICROSECONDS);
+ } else if ("ms".equals(name)) {
+ return new
ElapsedTimeElement(ElapsedTimeElement.Style.MILLISECONDS);
+ } else if ("fs".equals(name)) {
+ return new
ElapsedTimeElement(ElapsedTimeElement.Style.SECONDS_FRACTIONAL);
Review Comment:
Strictly, that is fs is femto seconds which doesn't look right. Maybe sf?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]