diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-25 10:39:34 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-25 10:39:34 -0800 |
commit | be26b4af155fcb2d3738be5b9ae4578ca70d2d4c (patch) | |
tree | 80931436c16675c05c73a0e7442ffaddd996595e | |
parent | cbf61df3d0542f5ee91e93835cc8e9cc87446035 (diff) |
print library debug to stdout, not err
-rw-r--r-- | src/jsifier.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 4192cd3f..c7279168 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -417,8 +417,8 @@ function JSify(data, functionsOnly, givenFunctions) { // name the function; overwrite if it's already named snippet = snippet.replace(/function(?:\s+([^(]+))?\s*\(/, 'function _' + ident + '('); if (LIBRARY_DEBUG) { - snippet = snippet.replace('{', '{ var ret = (function() { if (Runtime.debug) Module.printErr("[library call:' + ident + ': " + Array.prototype.slice.call(arguments).map(Runtime.prettyPrint) + "]"); '); - snippet = snippet.substr(0, snippet.length-1) + '}).apply(this, arguments); if (Runtime.debug && typeof ret !== "undefined") Module.printErr(" [ return:" + Runtime.prettyPrint(ret)); return ret; }'; + snippet = snippet.replace('{', '{ var ret = (function() { if (Runtime.debug) Module.print("[library call:' + ident + ': " + Array.prototype.slice.call(arguments).map(Runtime.prettyPrint) + "]"); '); + snippet = snippet.substr(0, snippet.length-1) + '}).apply(this, arguments); if (Runtime.debug && typeof ret !== "undefined") Module.print(" [ return:" + Runtime.prettyPrint(ret)); return ret; }'; } } |