You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/02/28 15:03:00 UTC

[jira] [Work logged] (LOG4J2-3280) Support for microsecond precision in RFC5424Layout

     [ https://issues.apache.org/jira/browse/LOG4J2-3280?focusedWorklogId=848089&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-848089 ]

ASF GitHub Bot logged work on LOG4J2-3280:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Feb/23 15:02
            Start Date: 28/Feb/23 15:02
    Worklog Time Spent: 10m 
      Work Description: vy closed pull request #683: LOG4J2-3280 - Add support for microsecond precision in RFC5424Layout
URL: https://github.com/apache/logging-log4j2/pull/683




Issue Time Tracking
-------------------

            Worklog Id:     (was: 848089)
    Remaining Estimate: 0h
            Time Spent: 10m

> Support for microsecond precision in RFC5424Layout
> --------------------------------------------------
>
>                 Key: LOG4J2-3280
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3280
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Layouts
>    Affects Versions: 2.0, 2.17.0
>         Environment: Tomcat 8.5.x
> Java 11
> log4j 2.17.0
>            Reporter: Atul Pendse
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {color:#000000}Our application sends syslog messages to a centralized facility which requires timestamps to be in microsecond format.{color}
> {color:#000000}Our application was so far using log4j 1.12.5’s Syslog appender to send syslog messages, which used to format timestamps with microsecond precision.{color}
> {color:#000000}We are now upgrading to log4j 2.17.0, and don’t see any way to get microseconds included in timestamp for syslog.{color}
> {color:#000000}I am trying to log messages using SyslogAppender with RFC5424 layout.{color}
> {color:#000000}I see that RFC5424Layout.java restricts timestamp to millisecond precision (e.g. 2021-12-22T22:54:33.889-08:00).{color}
> {color:#000000}RFC5424 specification also mentions support for microsecond precision. Here is some text from {color}[https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.3]
> {color:#000000}Example 4{color}
> {color:#000000}         2003-08-24T05:14:15.000003-07:00{color}
> {color:#000000}   This represents 24 August 2003 at 05:14:15am, 3 microseconds into the{color}
> {color:#000000}   next second.  The microsecond resolution is indicated by the{color}
> {color:#000000}   additional digits in TIME-SECFRAC.  The timestamp indicates that its{color}
> {color:#000000}   local time is -7 hours from UTC.  This timestamp might be created in{color}
> {color:#000000}   the US Pacific time zone during daylight savings time.{color}
>  
> {color:#000000}The RFE is to add support for microsecond precision while formatting timestamp in RFC5424 layout{color}
> {color:#000000}A new layout attribute to define millisecond/microsecond precision would be a preferred way.{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)