[
https://issues.apache.org/jira/browse/LOG4J2-2338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16473333#comment-16473333
]
Remko Popma commented on LOG4J2-2338:
-------------------------------------
(Away from PC)
Could you confirm that the underlying platform does provide the required
granularity? For example:
{code}
for (int i = 0; i < 1000; i ++) {
logger.info(“nano since second: {}”, Instant.now().getNano());
}
{code}
> Micosecond, nano second level logging not working.
> --------------------------------------------------
>
> Key: LOG4J2-2338
> URL: https://issues.apache.org/jira/browse/LOG4J2-2338
> Project: Log4j 2
> Issue Type: Bug
> Environment: JRE10
> Reporter: Chetna Rustagi
> Priority: Critical
>
> Using JRE10 and log4j2, getting logs as :
> 12:42:05,972803200 [main] DEBUG Log4j2Test -Debug Message Logged!!!
> 12:42:05,975803200 [main] INFO Log4j2Test - Info Message Logged !!!
> 12:42:05,975803200 [main] ERROR Log4j2Test - Error Message Logged !!!
> micro and nanoseconds are always same : 803200
> Log4j2.xml looks like:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration status="INFO">
> <Appenders>
> <Console name="console" target="SYSTEM_OUT">
> <PatternLayout pattern="%d{ABSOLUTE_NANOS} [%t] %-5level %logger{36} -
> %msg%n"/>
> <!-- <PatternLayout
> pattern="[%-5level] %d{ABSOLUTE_NANOS} [%t] %c{1} - %msg%n" /> -->
> </Console>
> </Appenders>
> <Loggers>
> <Root level="debug" additivity="false">
> <AppenderRef ref="console" />
> </Root>
> </Loggers>
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)