Add debug prints for create, update and delete rules
@@ -521,6 +521,7 @@ int DeRestPluginPrivate::createRule(const ApiRequest &req, ApiResponse &rsp)
updateEtag(rule.etag);
updateEtag(gwConfigEtag);
+ DBG_Printf(DBG_INFO, "create rule %s: %s\n", qPrintable(rule.id()), qPrintable(rule.name()));
rules.push_back(rule);
queueCheckRuleBindings(rule);
indexRulesTriggers();
@@ -564,6 +565,8 @@ int DeRestPluginPrivate::updateRule(const ApiRequest &req, ApiResponse &rsp)
return REQ_READY_SEND;
}
+ DBG_Printf(DBG_INFO, "update rule %s: %s\n", qPrintable(id), qPrintable(rule->name()));
+
QVariant var = Json::parse(req.content, ok);
QVariantMap map = var.toMap();
QVariantList conditionsList;
@@ -926,6 +929,8 @@ int DeRestPluginPrivate::deleteRule(const ApiRequest &req, ApiResponse &rsp)
rule->setStatus("disabled");
queueCheckRuleBindings(*rule);
+ DBG_Printf(DBG_INFO, "delete rule %s: %s\n", qPrintable(id), qPrintable(rule->name()));
+
QVariantMap rspItem;
QVariantMap rspItemState;
rspItemState["id"] = id;
