Improved Recipe logging

This commit is contained in:
n1474335 2017-12-28 18:24:29 +00:00
parent d079420d46
commit a96eb450de
1 changed files with 5 additions and 3 deletions

View File

@ -149,18 +149,19 @@ Recipe.prototype.execute = async function(dish, startFrom) {
for (let i = startFrom; i < this.opList.length; i++) {
op = this.opList[i];
log.debug(`[${i}] ${op.name}`);
if (op.isDisabled()) {
log.debug(`[${i}] '${op.name}' is disabled`);
log.debug("Operation is disabled, skipping");
continue;
}
if (op.isBreakpoint()) {
log.debug(`[${i}] Pausing at breakpoint on '${op.name}'`);
log.debug("Pausing at breakpoint");
return i;
}
try {
input = dish.get(op.inputType);
log.debug(`[${i}] Executing '${op.name}'`);
log.debug("Executing operation");
if (op.isFlowControl()) {
// Package up the current state
@ -196,6 +197,7 @@ Recipe.prototype.execute = async function(dish, startFrom) {
}
}
log.debug("Recipe complete");
return this.opList.length;
};