mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Solving log errors
Signed-off-by: clinique <gael@lhopital.org>
This commit is contained in:
parent
f69d5214ab
commit
b51b0e2a0e
@ -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);
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user