add item name to ScriptBusEvent log messages (#2503)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>pull/2502/head
parent
338204341b
commit
1d17166c79
|
@ -94,7 +94,8 @@ public class ScriptBusEvent {
|
||||||
if (command != null) {
|
if (command != null) {
|
||||||
eventPublisher.post(ItemEventFactory.createCommandEvent(itemName, command));
|
eventPublisher.post(ItemEventFactory.createCommandEvent(itemName, command));
|
||||||
} else {
|
} 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) {
|
} catch (ItemNotFoundException e) {
|
||||||
LoggerFactory.getLogger(ScriptBusEvent.class).warn("Item '{}' does not exist.", itemName);
|
LoggerFactory.getLogger(ScriptBusEvent.class).warn("Item '{}' does not exist.", itemName);
|
||||||
|
@ -158,7 +159,8 @@ public class ScriptBusEvent {
|
||||||
if (state != null) {
|
if (state != null) {
|
||||||
eventPublisher.post(ItemEventFactory.createStateEvent(itemName, state));
|
eventPublisher.post(ItemEventFactory.createStateEvent(itemName, state));
|
||||||
} else {
|
} 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) {
|
} catch (ItemNotFoundException e) {
|
||||||
LoggerFactory.getLogger(ScriptBusEvent.class).warn("Item '{}' does not exist.", itemName);
|
LoggerFactory.getLogger(ScriptBusEvent.class).warn("Item '{}' does not exist.", itemName);
|
||||||
|
|
Loading…
Reference in New Issue