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 subversion and git services (Jira)" <ji...@apache.org> on 2020/04/19 21:23:00 UTC

[jira] [Commented] (LOG4J2-2588) Unable to reinstate old timeMillis timestamp using log4j2.clock property in JSON layout

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

ASF subversion and git services commented on LOG4J2-2588:
---------------------------------------------------------

Commit 927f2ba66e9851e5527de106497969392b7fb483 in logging-log4j2's branch refs/heads/release-2.x from Ralph Goers
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=927f2ba ]

LOG4J2-2588 - Add option to restore printing timeMillis in the JsonLayout.


> Unable to reinstate old timeMillis timestamp using log4j2.clock property in JSON layout
> ---------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2588
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2588
>             Project: Log4j 2
>          Issue Type: Bug
>            Reporter: Simon Wydooghe
>            Assignee: Ralph Goers
>            Priority: Minor
>
> As per the changes listed in [https://logging.apache.org/log4j/2.0/changes-report.html#a2.11.0,] it seems the timestamp is now being reported as "instant":\{"epochSecond":1555050778,"nanoOfSecond":738424000} (for instance) in the JSON output.
> I'd like to however revert back to the old timeMillis format because it's easier to parse using a log forwarder. As per the documentation found, it seems I should be able to use log4j2.clock=SystemMillisClock property to revert this behaviour. That doesn't seem to work though. I've tried both variants of the property I could find in the docs (log4j.Clock and log4j2.clock).
> Am I misinterpreting the documentation? I just want an easy way to get back the timeMillis.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)