You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/01/10 04:55:20 UTC

[GitHub] [logging-log4j2] atulpendse edited a comment on pull request #683: LOG4J2-3280 - Add support for microsecond precision in RFC5424Layout

atulpendse edited a comment on pull request #683:
URL: https://github.com/apache/logging-log4j2/pull/683#issuecomment-1008543504


   @vy 
   Thanks for taking time to review the PR.
   Here are my thoughts about questions you raised.
   
   > I am also not sure if a `timestampPrecision` argument of type `String` is the right way to go. Thinking out loudly:
   > 
   > * Why don't we simply make the instant formatting pattern configurable?
   
   With making pattern configurable, there is risk of the message not being compliant to RFC5424 spec (if someone updates format that is not as per RFC5424)
   
   > * Doesn't the spec enforce a certain precision?
   
   The spec does not enforce 'a particular' precision, rather it supports three precisions
   
   1. Without any sub-second value
   2. Milliseconds
   3. Microseconds
   
   
   > * If not, why don't we simply (automatically?) pick the most precise representation possible?
   
   We could, that would work for my usecase. But if someone is expecting precision to be millisecond (like my app was expecting it to be microsecond), it would break their app.
   
   I will add a test for SyslogAppender.


-- 
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-unsubscribe@logging.apache.org

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