Fix LogMessage placeholders in MqttHeaderMapper

Fixes: #8888 

* Fix `LogMessage` formatting placeholders in `MqttHeaderMapper`

**cherry-pick to `6.2.x` & `6.1.x`
This commit is contained in:
Václav Haisman
2024-02-07 14:57:17 +01:00
committed by GitHub
parent 91ce70d1ad
commit 8b877fc887

View File

@@ -122,13 +122,13 @@ public class MqttHeaderMapper implements HeaderMapper<MqttProperties> {
if (patterns != null && patterns.length > 0) {
for (String pattern : patterns) {
if (PatternMatchUtils.simpleMatch(pattern, headerName)) {
LOGGER.debug(LogMessage.format("headerName=[{0}] WILL be mapped, matched pattern={1}",
LOGGER.debug(LogMessage.format("headerName=[%s] WILL be mapped, matched pattern=%s",
headerName, pattern));
return true;
}
}
}
LOGGER.debug(LogMessage.format("headerName=[{0}] WILL NOT be mapped", headerName));
LOGGER.debug(LogMessage.format("headerName=[%s] WILL NOT be mapped", headerName));
return false;
}