Solving log errors

Signed-off-by: clinique <gael@lhopital.org>
This commit is contained in:
clinique 2024-12-27 10:34:21 +01:00 committed by gael@lhopital.org
parent f69d5214ab
commit b51b0e2a0e
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ public class M2MMessageParser {
public void unsolicitedUpdate(String data) { public void unsolicitedUpdate(String data) {
if ("OK".equals(data)) { // If OK, do nothing special if ("OK".equals(data)) { // If OK, do nothing special
} else if ("? Bad command".equals(data)) { } else if ("? Bad command".equals(data)) {
logger.warn(data); logger.warn("{}", data);
} else if (IO_PATTERN.matcher(data).matches()) { } else if (IO_PATTERN.matcher(data).matches()) {
PortDefinition portDefinition = PortDefinition.fromM2MCommand(expectedResponse); PortDefinition portDefinition = PortDefinition.fromM2MCommand(expectedResponse);
decodeDataLine(portDefinition, data); decodeDataLine(portDefinition, data);

View File

@ -59,7 +59,7 @@ public class StatusFile {
result.put(Integer.parseInt(node.getNodeName().replace(searched, "")) + 1, result.put(Integer.parseInt(node.getNodeName().replace(searched, "")) + 1,
Double.parseDouble(node.getTextContent().replace("dn", "1").replace("up", "0"))); Double.parseDouble(node.getTextContent().replace("dn", "1").replace("up", "0")));
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.warn(e.getMessage()); logger.warn("{}", e.getMessage());
} }
}); });
return result; return result;