From 5aea35b0088421dc0a439a33733b7f2b0dfeab21 Mon Sep 17 00:00:00 2001 From: bmalinowsky Date: Thu, 9 May 2024 16:02:31 +0200 Subject: [PATCH] When using a formatted string, additional exception argument is ignored --- src/io/calimero/mgmt/ManagementClientImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/io/calimero/mgmt/ManagementClientImpl.java b/src/io/calimero/mgmt/ManagementClientImpl.java index dd7f7be2..f77c44cf 100644 --- a/src/io/calimero/mgmt/ManagementClientImpl.java +++ b/src/io/calimero/mgmt/ManagementClientImpl.java @@ -48,6 +48,7 @@ import java.io.ByteArrayOutputStream; import java.lang.System.Logger; import java.nio.ByteBuffer; +import java.text.MessageFormat; import java.time.Duration; import java.util.ArrayDeque; import java.util.ArrayList; @@ -206,7 +207,7 @@ private void checkResponse(final FrameEvent e) { catch (final RuntimeException rte) { final var cemi = e.getFrame(); final var src = cemi instanceof final CEMILData cemild ? cemild.getDestination() : "cEMI server"; - logger.log(WARNING, "on indication from {0}", src, rte); + logger.log(WARNING, MessageFormat.format("on indication from {0}", src), rte); } } }