ppkarwasz commented on code in PR #3789:
URL: https://github.com/apache/logging-log4j2/pull/3789#discussion_r2196109011


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java:
##########
@@ -109,40 +109,19 @@ private static String readPattern(@Nullable final 
String[] options) {
      * @since 2.25.0
      */
     static String decodeNamedPattern(final String pattern) {
-        // If legacy formatters are enabled, we need to produce output aimed 
for `FixedDateFormat` and `FastDateFormat`.

Review Comment:
   Can we simplify this comment a bit? It currently takes many lines to explain 
two main points:
   
   * `FixedDateFormat` uses `n` to represent various sub-second fractions, 
while `DateTimeFormatter` uses `n` strictly for nanoseconds.
   * `X` in `DateTimeFormatter` returns `"Z"` for zero offsets, whereas 
`SimpleDateFormat` returns `"00:00"`.
   
   At the same time, it omits some helpful context — for example, why do we 
convert `ABSOLUTE_PERIOD` to `"HH:mm:ss.SSS"` instead of passing it directly to 
the legacy formatter?
   
   



-- 
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: notifications-unsubscr...@logging.apache.org

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

Reply via email to