You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2018/01/17 17:24:00 UTC
[jira] [Comment Edited] (LOG4J2-1883) Support precise timestamps
(microsecond and nanosecond level)
[ https://issues.apache.org/jira/browse/LOG4J2-1883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16324991#comment-16324991 ]
Remko Popma edited comment on LOG4J2-1883 at 1/17/18 5:23 PM:
--------------------------------------------------------------
Breakdown:
# (/) PreciseClock and Instant interfaces (and mutable Instant impl)
# (/) add method {{LogEvent.getInstance}}
# (/) time format support for micro and nanosecond precision
# log4j-core-java9 module with precise clock implementation
-I’m now working on #2: the serialized form for LogEvent changed so many tests (jason, xml, yaml, JPA etc) need to be updated. Once that is done I will share on a branch while I start working on #3 and #4.-
(Update Jan 18) I will share on a branch when #4 is done unless someone wants to see it earlier.
was (Author: remkop@yahoo.com):
Breakdown:
# (/) PreciseClock and Instant interfaces (and mutable Instant impl)
# add method {{LogEvent.getInstance}}
# time format support for micro and nanosecond precision
# log4j-core-java9 module with precise clock implementation
I’m now working on #2: the serialized form for LogEvent changed so many tests (jason, xml, yaml, JPA etc) need to be updated.
Once that is done I will share on a branch while I start working on #3 and #4.
> Support precise timestamps (microsecond and nanosecond level)
> -------------------------------------------------------------
>
> Key: LOG4J2-1883
> URL: https://issues.apache.org/jira/browse/LOG4J2-1883
> Project: Log4j 2
> Issue Type: Bug
> Components: Configurators
> Environment: Linux with any JDK including JDK1.8
> Reporter: Madhava Dass
> Assignee: Remko Popma
> Priority: Critical
>
> Used log4j and 'log4j2.xml' to configure timestamp format as:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration status="WARN">
> <Appenders>
> <Console name="Console" target="SYSTEM_OUT">
> <PatternLayout pattern="[%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}{UTC}][%level][%logger{36}]:%msg%n"/>
> </Console>
> </Appenders>
> <Loggers>
> <Root level="DEBUG">
> <AppenderRef ref="Console"/>
> </Root>
> </Loggers>
> </Configuration>
> {code}
> This pattern produces the time stamp as:
> {code}
> [2017-03-29T13:55:28.363000][null]:[Thread-1]: - <message>
> {code}
> The desired output is:
> {code}
> [2017-03-29T13:55:28.363701-07:00][null]:[Thread-1]: - <message>
> {code}
> Different versions of JDKs were tried including JDK 1.8. It does not seem to make any difference in the outcome.
> Is there a way to get the desired time stamp through pattern matching configuration in the '*.xml' file?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)