From 1d17166c79c79dfff5cbb4e96803a7d7d67ccf8f Mon Sep 17 00:00:00 2001 From: J-N-K Date: Sun, 3 Oct 2021 22:15:18 +0200 Subject: [PATCH] add item name to ScriptBusEvent log messages (#2503) Signed-off-by: Jan N. Klug --- .../module/script/internal/defaultscope/ScriptBusEvent.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/defaultscope/ScriptBusEvent.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/defaultscope/ScriptBusEvent.java index a9ee1c5c58..290735cbd2 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/defaultscope/ScriptBusEvent.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/defaultscope/ScriptBusEvent.java @@ -94,7 +94,8 @@ public class ScriptBusEvent { if (command != null) { eventPublisher.post(ItemEventFactory.createCommandEvent(itemName, command)); } else { - LoggerFactory.getLogger(ScriptBusEvent.class).warn("Command '{}' cannot be parsed.", commandString); + LoggerFactory.getLogger(ScriptBusEvent.class).warn("Command '{}' cannot be parsed for item '{}'.", + commandString, item); } } catch (ItemNotFoundException e) { LoggerFactory.getLogger(ScriptBusEvent.class).warn("Item '{}' does not exist.", itemName); @@ -158,7 +159,8 @@ public class ScriptBusEvent { if (state != null) { eventPublisher.post(ItemEventFactory.createStateEvent(itemName, state)); } else { - LoggerFactory.getLogger(ScriptBusEvent.class).warn("State '{}' cannot be parsed.", stateString); + LoggerFactory.getLogger(ScriptBusEvent.class).warn("State '{}' cannot be parsed for item '{}'.", + stateString, itemName); } } catch (ItemNotFoundException e) { LoggerFactory.getLogger(ScriptBusEvent.class).warn("Item '{}' does not exist.", itemName);