[slf4j-dev] [JIRA] Updates for SLF4J-421: LoggerWrapper and subclasses perform argument substitution twice

QOS.CH (JIRA) noreply-jira at qos.ch
Thu Jul 1 21:08:00 CEST 2021


SLF4J / SLF4J-421 [In Progress]
LoggerWrapper and subclasses perform argument substitution twice 

==============================

Here's what changed in this issue in the last few minutes.

There is 1 comment.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-421

==============================
 1 comment
------------------------------

Ceki Gülcü on 01/Jul/21 8:55 PM
The problem stems from the fact that {{LoggerWrapper}} invokes {{MessageFormatter.format()}} before invoking the {{LocationAwareLogger.log()}} method. A {{LocationAwareLogger}} will in turn invoke {{MessageFormatter.format()}} with the parameters given to it. Hence the behavior, you observe.

The solution is not to change {{MessageFormatter}} but simply not invoke {{MessageFormatter.format()}} before calling  {{LocationAwareLogger.log()}}  *in* {{LoggerWrapper}}.


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the slf4j-dev mailing list