From 840b9b2f89a75e90dc6d32316bf8322114199e30 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sat, 16 Mar 2024 23:22:33 +0100 Subject: [PATCH] Log sensor id along with sensor.community upload result --- .../java/nl/bertriksikken/senscom/SensComUploader.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sensor-data-bridge/src/main/java/nl/bertriksikken/senscom/SensComUploader.java b/sensor-data-bridge/src/main/java/nl/bertriksikken/senscom/SensComUploader.java index 838b8ac..721856c 100644 --- a/sensor-data-bridge/src/main/java/nl/bertriksikken/senscom/SensComUploader.java +++ b/sensor-data-bridge/src/main/java/nl/bertriksikken/senscom/SensComUploader.java @@ -182,15 +182,15 @@ private void performUpload(AppDeviceId appDeviceId, SensorData data) { private void uploadMeasurement(ESensComPin pin, String sensorId, SensComMessage message) { try { - LOG.info("Sending for {} to pin {}: '{}'", sensorId, pin, mapper.writeValueAsString(message)); + LOG.info("Uploading for {} to pin {}: '{}'", sensorId, pin, mapper.writeValueAsString(message)); Response response = restClient.pushSensorData(pin.getPin(), sensorId, message).execute(); if (response.isSuccessful()) { - LOG.info("Result success: {}", response.body()); + LOG.info("Upload success for {}: {}", sensorId, response.body()); } else { - LOG.warn("Request failed: {} - {}", response.message(), response.errorBody().string()); + LOG.warn("Upload failed for {}: {} - {}", sensorId, response.message(), response.errorBody().string()); } } catch (IOException e) { - LOG.warn("Caught IOException: {}", e.getMessage()); + LOG.warn("Caught IOException for {}: {}", sensorId, e.getMessage()); } }