ChristopherSchultz commented on code in PR #721:
URL: https://github.com/apache/tomcat/pull/721#discussion_r1578085100


##########
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:
   Done/



##########
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:
   Done.



-- 
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: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to