[ 
https://issues.apache.org/jira/browse/LOG4J2-944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14287415#comment-14287415
 ] 

Gary Gregory commented on LOG4J2-944:
-------------------------------------

If you do use the default layout, which is RFC5424, then we currently do not 
add milliseconds when 0:

{code:java}
        final int millis = cal.get(Calendar.MILLISECOND);
        if (millis != 0) {
            buffer.append('.');
            pad(millis, THREE_DIGITS, buffer);
        }
{code}

I do not see where in the spec 
https://tools.ietf.org/html/rfc5424#section-6.2.3 it specifies to omit 0 
millisconds.

Let's see if [[email protected]]/[[email protected]] can 
shed some light on this.

> Log4j Flume appender is not adding millisecond to the event headers when the 
> event is logged at 000 milliseconds.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-944
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-944
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Flume Appender
>    Affects Versions: 2.0-rc1
>            Reporter: Vinayaka Ramachandra
>
> If the event happens at exact 000 milliseconds, then milliseconds is not 
> inserted.
> We are sending the data to Flume  appenders in syslog Format. where it will 
> add headers.  In header  the standard time stamp is in Below Format 
> 2015-01-06T07:32:43.345-08:00
> But when the event is logged exactly at 000 milliseconds then millisecond  
> part is missing  as we can see in below code.
> 2015-01-06T07:32:43-08:00
> This cause  exception when we process the data including milliseconds.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to