You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2014/07/28 20:10:38 UTC

[jira] [Comment Edited] (LOG4J2-744) Aviod unnecessary Clock calls when TimestampMessage is logged

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

Gary Gregory edited comment on LOG4J2-744 at 7/28/14 6:08 PM:
--------------------------------------------------------------

I think {{isTimestampSet()}} is more clear. To me, {{hasTimestamp()}} answers the question "Do you carry a timestamp of any kind?" as opposed to "Is your timestamp value set?". If an object has no timestamp, a return value of {{false}} makes sense.

But this new API makes me think of 2.1, not 2.0.1.

I think either we do this and call the next release 2.1, or of us volunteers as RM for 2.0.1 since Ralph is going to be busy moving and getting surgery. Well, one of you, I am packing boxes to move as well! ;-)


was (Author: garydgregory):
I think {{isTimestampSet()}} is more clear. To me, {{hasTimestamp()}} answers the question "Do you carry a timestamp of any kind?" as opposed to "Is your timestamp value set?". If an object has no timestamp, a return value of {{false}} makes sense.

> Aviod unnecessary Clock calls when TimestampMessage is logged
> -------------------------------------------------------------
>
>                 Key: LOG4J2-744
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-744
>             Project: Log4j 2
>          Issue Type: Improvement
>            Reporter: Scott Harrington
>            Priority: Minor
>         Attachments: LOG4J2-744-test.patch, LOG4J2-744.patch
>
>
> The TimestampMessage interface was introduced in LOG4J2-53 and revised for AsyncLogger in LOG4J2-455.
> I've observed that Clock.currentTimeMillis is still called which should not be necessary.
> I have two patches, one which adds JUnit tests that demonstrate the unnecessary Clock calls, and one which fixes the issue for both AsyncLogger and "traditional" configurations.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org