]> git.basschouten.com Git - openhab-addons.git/commitdiff
[MQTT] Add additional logging information (#11849)
authorLukasA83 <58861945+LukasA83@users.noreply.github.com>
Mon, 27 Dec 2021 18:59:47 +0000 (19:59 +0100)
committerGitHub <noreply@github.com>
Mon, 27 Dec 2021 18:59:47 +0000 (19:59 +0100)
* [MQTT] Add additional logging information

Add additional logging information when command is not supported by type.

Signed-off-by: Lukas Agethen <lukas83@gmx.de>
bundles/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/ChannelState.java

index 88138a9c05e1e1976aff21204a0775384aa64888..8f01278e8f6f14e6e5a0e5065ffb277df74d1f7b 100644 (file)
@@ -191,8 +191,8 @@ public class ChannelState implements MqttMessageSubscriber {
         try {
             cachedValue.update(command);
         } catch (IllegalArgumentException | IllegalStateException e) {
-            logger.warn("Command '{}' not supported by type '{}': {}", strValue, cachedValue.getClass().getSimpleName(),
-                    e.getMessage());
+            logger.warn("Command '{}' from channel '{}' not supported by type '{}': {}", strValue, channelUID,
+                    cachedValue.getClass().getSimpleName(), e.getMessage());
             receivedOrTimeout();
             return;
         }