Re: [PR] Add support for timescales with time-taken access log token. [tomcat]
ChristopherSchultz merged PR #721: URL: https://github.com/apache/tomcat/pull/721 -- 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
Re: [PR] Add support for timescales with time-taken access log token. [tomcat]
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
Re: [PR] Add support for timescales with time-taken access log token. [tomcat]
markt-asf commented on code in PR #721: URL: https://github.com/apache/tomcat/pull/721#discussion_r1572780769 ## 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: It is the electronics engineer in me - capacitors have really small values. `fracsec` works for me. -- 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
Re: [PR] Add support for timescales with time-taken access log token. [tomcat]
ChristopherSchultz commented on code in PR #721: URL: https://github.com/apache/tomcat/pull/721#discussion_r1572455403 ## 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: Good question. I actually thought of femtoseconds and then thought "who actually knows about those?" and now I guess I have my answer. We could use `sf`, sure... also `s.` which is a little obscure. There is no reason is has to be two-letters, either. `fracsec`? -- 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
Re: [PR] Add support for timescales with time-taken access log token. [tomcat]
ChristopherSchultz commented on code in PR #721: URL: https://github.com/apache/tomcat/pull/721#discussion_r1572451843 ## 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: If course I did. Thanks for spotting that. -- 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
Re: [PR] Add support for timescales with time-taken access log token. [tomcat]
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: 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