[ https://issues.apache.org/jira/browse/RATIS-768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Attila Doroszlai updated RATIS-768: ----------------------------------- Attachment: RATIS-768.001.patch > LogUtils#infoOrTrace prints exception trace at both levels > ---------------------------------------------------------- > > Key: RATIS-768 > URL: https://issues.apache.org/jira/browse/RATIS-768 > Project: Ratis > Issue Type: Bug > Reporter: Attila Doroszlai > Assignee: Attila Doroszlai > Priority: Trivial > Attachments: RATIS-768.001.patch > > > With logging set to > * trace level, log contains "message" and the stack trace > * info level, log will have "message: {}" and the stack trace > I think the intention was to only log the exception message instead of the > stack trace at info level. Otherwise there is no difference between the > levels other than the stray placeholder. > {code} > static void infoOrTrace(Logger log, Supplier<String> message, Throwable t) { > if (log.isTraceEnabled()) { > log.trace(message.get(), t); > } else { > log.info("{}: {}", message.get(), t); > } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)