[automation] Improve logging in ScriptConditionHandler (#4192)
Fixes #4179. Signed-off-by: Florian Hotze <florianh_dev@icloud.com>pull/4185/head
parent
a79a9c651b
commit
b9940d6687
|
@ -60,10 +60,12 @@ public class ScriptConditionHandler extends AbstractScriptModuleHandler<Conditio
|
||||||
if (returnVal instanceof Boolean boolean1) {
|
if (returnVal instanceof Boolean boolean1) {
|
||||||
result = boolean1;
|
result = boolean1;
|
||||||
} else {
|
} else {
|
||||||
logger.error("Script did not return a boolean value, but '{}'", returnVal);
|
logger.error("Script of rule with UID '{}' did not return a boolean value, but '{}'", ruleUID,
|
||||||
|
returnVal);
|
||||||
}
|
}
|
||||||
} catch (ScriptException e) {
|
} catch (ScriptException e) {
|
||||||
logger.error("Script execution failed: {}", e.getMessage());
|
logger.error("Script execution of rule with UID '{}' failed: {}", ruleUID, e.getMessage(),
|
||||||
|
logger.isDebugEnabled() ? e : null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue