mirror of https://github.com/nymea/nymea.git
cleanup debug prints
parent
abd2305bc0
commit
dd6459a2e9
|
|
@ -58,7 +58,6 @@
|
|||
#include "loggingcategories.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
|
||||
namespace nymeaserver {
|
||||
|
||||
|
|
@ -216,9 +215,6 @@ JsonReply *RulesHandler::GetRuleDetails(const QVariantMap ¶ms)
|
|||
return createReply(statusToReply(RuleEngine::RuleErrorRuleNotFound));
|
||||
}
|
||||
QVariantMap returns = statusToReply(RuleEngine::RuleErrorNoError);
|
||||
qWarning() << "Have rule" << rule;
|
||||
QJsonDocument jsonDoc = QJsonDocument::fromVariant(JsonTypes::packRule(rule));
|
||||
qWarning() << "packed:" << jsonDoc.toJson();
|
||||
returns.insert("rule", JsonTypes::packRule(rule));
|
||||
return createReply(returns);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -680,7 +680,6 @@ RuleEngine::RuleError RuleEngine::addRule(const Rule &rule, bool fromEdit)
|
|||
return RuleError::RuleErrorActionTypeNotFound;
|
||||
}
|
||||
foreach (const ParamType &ifaceActionParamType, ifaceActionType.paramTypes()) {
|
||||
qWarning() << "iface requires param:" << ifaceActionParamType.name();
|
||||
if (!action.ruleActionParams().hasParam(ifaceActionParamType.name())) {
|
||||
qCWarning(dcRuleEngine()) << "Cannot create rule. Interface action" << iface.name() << ":" << action.interfaceAction() << "requires a" << ifaceActionParamType.name() << "param of type" << QVariant::typeToName(ifaceActionParamType.type());
|
||||
return RuleError::RuleErrorMissingParameter;
|
||||
|
|
@ -751,7 +750,6 @@ RuleEngine::RuleError RuleEngine::addRule(const Rule &rule, bool fromEdit)
|
|||
return RuleError::RuleErrorActionTypeNotFound;
|
||||
}
|
||||
foreach (const ParamType &ifaceActionParamType, ifaceActionType.paramTypes()) {
|
||||
qWarning() << "iface requires param:" << ifaceActionParamType.name();
|
||||
if (!ruleAction.ruleActionParams().hasParam(ifaceActionParamType.name())) {
|
||||
qCWarning(dcRuleEngine()) << "Cannot create rule. Interface action" << iface.name() << ":" << ruleAction.interfaceAction() << "requires a" << ifaceActionParamType.name() << "param of type" << QVariant::typeToName(ifaceActionParamType.type());
|
||||
return RuleError::RuleErrorMissingParameter;
|
||||
|
|
@ -1283,7 +1281,7 @@ void RuleEngine::appendRule(const Rule &rule)
|
|||
{
|
||||
Rule newRule = rule;
|
||||
newRule.setStatesActive(newRule.stateEvaluator().evaluate());
|
||||
qCDebug(dcRuleEngineDebug()) << "Appending new Rule:" << newRule;
|
||||
qCDebug(dcRuleEngine()) << "Adding Rule:" << newRule;
|
||||
m_rules.insert(rule.id(), newRule);
|
||||
m_ruleIds.append(rule.id());
|
||||
}
|
||||
|
|
@ -1450,7 +1448,7 @@ void RuleEngine::saveRule(const Rule &rule)
|
|||
settings.endGroup();
|
||||
}
|
||||
settings.endGroup();
|
||||
qWarning() << "#### Saved rule to config:" << rule;
|
||||
qCDebug(dcRuleEngineDebug()) << "Saved rule to config:" << rule;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,7 +210,6 @@ QList<DeviceId> StateEvaluator::containedDevices() const
|
|||
The \a groupName will normally be the corresponding \l Rule. */
|
||||
void StateEvaluator::dumpToSettings(NymeaSettings &settings, const QString &groupName) const
|
||||
{
|
||||
qWarning() << "Dumping to settings:" << groupName;
|
||||
settings.beginGroup(groupName);
|
||||
|
||||
settings.beginGroup("stateDescriptor");
|
||||
|
|
@ -263,7 +262,6 @@ StateEvaluator StateEvaluator::loadFromSettings(NymeaSettings &settings, const Q
|
|||
}
|
||||
settings.endGroup();
|
||||
settings.endGroup();
|
||||
qWarning() << "*** loading from settings" << groupName << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,5 @@
|
|||
if [ -z $2 ]; then
|
||||
echo "usage: $0 host ruleId"
|
||||
else
|
||||
echo '{"id":1, "method":"Rules.GetRuleDetails", "params": {"ruleId": "'$2'"}}'
|
||||
(echo '{"id":1, "method":"Rules.GetRuleDetails", "params": {"ruleId": "'$2'"}}'; sleep 1) | nc $1 2222
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue