logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-944) Log4j Flume appender is not adding millisecond to the event headers when the event is logged at 000 milliseconds.
Date Thu, 22 Jan 2015 13:29:34 GMT

    [ 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 [~ralph_goers@dslextreme.com]/[~ralph.goers@dslextreme.com] 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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message