[Minor] Don't log value, if value is null on sending

This commit is contained in:
Robert von Burg 2021-02-17 10:08:44 +01:00
parent 50f2129add
commit ba743b9ca0
1 changed files with 4 additions and 1 deletions

View File

@ -203,7 +203,10 @@ public class PlcGwServerHandler extends StrolchComponent {
private void send(PlcSession plcSession, PlcAddressKey plcAddressKey, JsonPrimitive valueJ,
PlcAddressResponseListener listener) {
logger.info("Sending " + plcAddressKey + " with value " + valueJ + " to " + plcSession.plcId + "...");
if (valueJ == null)
logger.info("Sending " + plcAddressKey + " to " + plcSession.plcId + "...");
else
logger.info("Sending " + plcAddressKey + " with value " + valueJ + " to " + plcSession.plcId + "...");
PlcAddressResponse plcResponse = new PlcAddressResponse(plcSession.plcId, plcAddressKey);
plcResponse.setListener(() -> handleResponse(listener, plcResponse));