[
https://issues.apache.org/jira/browse/LOG4J2-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488975#comment-17488975
]
Paul Rubin commented on LOG4J2-3075:
------------------------------------
Ok, I am finally looking at 2.17.1 and it appears this is not working
correctly, I am not sure I have correctly listed in the json schema:
{code:java}
"@timestamp_nano": {
"$resolver": "timestamp",
"pattern": {
"format": "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS'Z'",
"timeZone": "UTC"
}
},
{code}
The output is still showing milliseconds in the last three places:
{code:java}
"@timestamp_nano" : "2021-09-03T13:55:15.000000691Z",
{code}
> JsonTemplateLayout timestamp resolver doesn't format nanoseconds
> ----------------------------------------------------------------
>
> Key: LOG4J2-3075
> URL: https://issues.apache.org/jira/browse/LOG4J2-3075
> Project: Log4j 2
> Issue Type: Bug
> Components: JsonTemplateLayout
> Affects Versions: 2.14.0, 2.14.1
> Reporter: Paul Rubin
> Assignee: Volkan Yazici
> Priority: Minor
> Fix For: 3.0.0, 2.15.0
>
>
> As reported in LOG4J2-3073, {{TimestampResolver}} of {{JsonTemplateLayout}}
> doesn't format nanoseconds. The suspect is in the following form:
> {code:java}
> formatResolverContext.calendar.setTimeInMillis(timestampMillis);
> formatResolverContext.timestampFormat.format(
> formatResolverContext.calendar,
> formatResolverContext.formattedTimestampBuilder);
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)