Replace console with minilog

This commit is contained in:
Ray Schamp 2016-10-23 18:01:11 -04:00
parent f6c0064235
commit 73edb65c4d
5 changed files with 15 additions and 6 deletions
src/engine

View file

@ -1,3 +1,4 @@
var log = require('../util/log');
var Thread = require('./thread');
/**
@ -52,7 +53,7 @@ var execute = function (sequencer, thread) {
if (!opcode) {
console.warn('Could not get opcode for block: ' + currentBlockId);
log.warn('Could not get opcode for block: ' + currentBlockId);
return;
}
@ -110,7 +111,7 @@ var execute = function (sequencer, thread) {
handleReport(fields[fieldKey].value);
}
} else {
console.warn('Could not get implementation for opcode: ' +
log.warn('Could not get implementation for opcode: ' +
opcode);
}
thread.requestScriptGlowInFrame = true;
@ -234,7 +235,7 @@ var execute = function (sequencer, thread) {
}, function (rejectionReason) {
// Promise rejected: the primitive had some error.
// Log it and proceed.
console.warn('Primitive rejected promise: ', rejectionReason);
log.warn('Primitive rejected promise: ', rejectionReason);
thread.status = Thread.STATUS_RUNNING;
thread.popStack();
});