fixed log error and action execution from the log engine
This commit is contained in:
parent
5d91331683
commit
df99a2f438
@ -496,7 +496,7 @@ void GuhCore::gotEvent(const Event &event)
|
|||||||
foreach (const RuleAction &ruleAction, actions) {
|
foreach (const RuleAction &ruleAction, actions) {
|
||||||
Action action = ruleAction.toAction();
|
Action action = ruleAction.toAction();
|
||||||
qCDebug(dcRuleEngine) << "executing action" << ruleAction.actionTypeId();
|
qCDebug(dcRuleEngine) << "executing action" << ruleAction.actionTypeId();
|
||||||
DeviceManager::DeviceError status = m_deviceManager->executeAction(action);
|
DeviceManager::DeviceError status = executeAction(action);
|
||||||
switch(status) {
|
switch(status) {
|
||||||
case DeviceManager::DeviceErrorNoError:
|
case DeviceManager::DeviceErrorNoError:
|
||||||
break;
|
break;
|
||||||
@ -512,7 +512,9 @@ void GuhCore::gotEvent(const Event &event)
|
|||||||
default:
|
default:
|
||||||
qCWarning(dcRuleEngine) << "Error executing action:" << status;
|
qCWarning(dcRuleEngine) << "Error executing action:" << status;
|
||||||
}
|
}
|
||||||
m_logger->logAction(action, status == DeviceManager::DeviceErrorNoError ? Logging::LoggingLevelInfo : Logging::LoggingLevelAlert, status);
|
|
||||||
|
if (status != DeviceManager::DeviceErrorAsync)
|
||||||
|
m_logger->logAction(action, status == DeviceManager::DeviceErrorNoError ? Logging::LoggingLevelInfo : Logging::LoggingLevelAlert, status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user