[
https://issues.apache.org/jira/browse/LOG4J2-455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13846000#comment-13846000
]
Remko Popma commented on LOG4J2-455:
------------------------------------
Robin,
Sorry for the late response.
I'll try to take a look at this soon.
You do have a good point but I'd like to see what the performance impact is
before making this change.
> RingBufferLogEvent should use Messsage timestamp first
> ------------------------------------------------------
>
> Key: LOG4J2-455
> URL: https://issues.apache.org/jira/browse/LOG4J2-455
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.0-beta9
> Reporter: robin zhang tao
>
> When AsyncLogger received log message (method public void log(final Marker
> marker, final String fqcn, final Level level, final Message data,
> final Throwable t)), currently it uses clock.currentTimeMillis()
> (see at Line 221) as the timestamp.
> But it should check the message implements TimestampMessage or not, if yes,
> should use TimestampMessage.getTimestamp() as the timestamp, if not , then
> using clock.currentTimeMillis().
> The new Code:
> data instanceof TimestampMessage ? ((TimestampMessage) data ).getTimestamp()
> : clock.currentTimeMillis();
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]