Added logging with configurable levels to make debugging easier.

This commit is contained in:
n1474335 2017-12-28 18:17:38 +00:00
parent 124ff83206
commit d079420d46
17 changed files with 88 additions and 18 deletions

View file

@ -150,14 +150,17 @@ Recipe.prototype.execute = async function(dish, startFrom) {
for (let i = startFrom; i < this.opList.length; i++) {
op = this.opList[i];
if (op.isDisabled()) {
log.debug(`[${i}] '${op.name}' is disabled`);
continue;
}
if (op.isBreakpoint()) {
log.debug(`[${i}] Pausing at breakpoint on '${op.name}'`);
return i;
}
try {
input = dish.get(op.inputType);
log.debug(`[${i}] Executing '${op.name}'`);
if (op.isFlowControl()) {
// Package up the current state