Commit 78a0851b authored by Romain Courteaud's avatar Romain Courteaud

wip repl

parent d516a800
...@@ -136,22 +136,22 @@ ...@@ -136,22 +136,22 @@
if (!this._log_console) { if (!this._log_console) {
return; return;
} }
var txt, var txt = code,
parsed_code = code, parsed_code = code,
log; log;
// Check severity level // Check severity level
if (parsed_code >= 300) { if (parsed_code >= 300) {
txt = 'SKIP '; txt += ' SKIP ';
log = console.info; log = console.info;
} else if (parsed_code >= 200) { } else if (parsed_code >= 200) {
txt = 'SOLVE '; txt += ' SOLVE ';
log = console.log; log = console.log;
} else if (parsed_code >= 100) { } else if (parsed_code >= 100) {
txt = 'FORCE '; txt += ' FORCE ';
log = console.warn; log = console.warn;
} else { } else {
txt = 'ERROR '; txt += ' ERROR ';
log = console.error; log = console.error;
} }
...@@ -185,7 +185,14 @@ ...@@ -185,7 +185,14 @@
if (parsed_code !== 0) { if (parsed_code !== 0) {
txt += (parsed_code % 2 === 0) ? 'document' : 'attachment'; txt += (parsed_code % 2 === 0) ? 'document' : 'attachment';
} }
log(code, txt, a, b, c); txt += ' ' + a;
if (b !== undefined) {
txt += ' ' + b;
if (c !== undefined) {
txt += ' ' + c;
}
}
log(txt);
}, },
log: function (id, type, extra) { log: function (id, type, extra) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment