From b51b0e2a0ee4bb48d89ef1546630e2610d958e2d Mon Sep 17 00:00:00 2001 From: clinique Date: Fri, 27 Dec 2024 10:34:21 +0100 Subject: [PATCH] Solving log errors Signed-off-by: clinique --- .../openhab/binding/gce/internal/model/M2MMessageParser.java | 2 +- .../java/org/openhab/binding/gce/internal/model/StatusFile.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.gce/src/main/java/org/openhab/binding/gce/internal/model/M2MMessageParser.java b/bundles/org.openhab.binding.gce/src/main/java/org/openhab/binding/gce/internal/model/M2MMessageParser.java index f18ef61c19b..959141d3f20 100644 --- a/bundles/org.openhab.binding.gce/src/main/java/org/openhab/binding/gce/internal/model/M2MMessageParser.java +++ b/bundles/org.openhab.binding.gce/src/main/java/org/openhab/binding/gce/internal/model/M2MMessageParser.java @@ -43,7 +43,7 @@ public class M2MMessageParser { public void unsolicitedUpdate(String data) { if ("OK".equals(data)) { // If OK, do nothing special } else if ("? Bad command".equals(data)) { - logger.warn(data); + logger.warn("{}", data); } else if (IO_PATTERN.matcher(data).matches()) { PortDefinition portDefinition = PortDefinition.fromM2MCommand(expectedResponse); decodeDataLine(portDefinition, data); diff --git a/bundles/org.openhab.binding.gce/src/main/java/org/openhab/binding/gce/internal/model/StatusFile.java b/bundles/org.openhab.binding.gce/src/main/java/org/openhab/binding/gce/internal/model/StatusFile.java index 6b7f285d000..850f407ed37 100644 --- a/bundles/org.openhab.binding.gce/src/main/java/org/openhab/binding/gce/internal/model/StatusFile.java +++ b/bundles/org.openhab.binding.gce/src/main/java/org/openhab/binding/gce/internal/model/StatusFile.java @@ -59,7 +59,7 @@ public class StatusFile { result.put(Integer.parseInt(node.getNodeName().replace(searched, "")) + 1, Double.parseDouble(node.getTextContent().replace("dn", "1").replace("up", "0"))); } catch (NumberFormatException e) { - logger.warn(e.getMessage()); + logger.warn("{}", e.getMessage()); } }); return result;