Skip to content
This repository
Browse code

print library debug to stdout, not err

  • Loading branch information...
commit be26b4af155fcb2d3738be5b9ae4578ca70d2d4c 1 parent cbf61df
Alon Zakai authored December 25, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  src/jsifier.js
4  src/jsifier.js
@@ -417,8 +417,8 @@ function JSify(data, functionsOnly, givenFunctions) {
417 417
           // name the function; overwrite if it's already named
418 418
           snippet = snippet.replace(/function(?:\s+([^(]+))?\s*\(/, 'function _' + ident + '(');
419 419
           if (LIBRARY_DEBUG) {
420  
-            snippet = snippet.replace('{', '{ var ret = (function() { if (Runtime.debug) Module.printErr("[library call:' + ident + ': " + Array.prototype.slice.call(arguments).map(Runtime.prettyPrint) + "]"); ');
421  
-            snippet = snippet.substr(0, snippet.length-1) + '}).apply(this, arguments); if (Runtime.debug && typeof ret !== "undefined") Module.printErr("  [     return:" + Runtime.prettyPrint(ret)); return ret; }';
  420
+            snippet = snippet.replace('{', '{ var ret = (function() { if (Runtime.debug) Module.print("[library call:' + ident + ': " + Array.prototype.slice.call(arguments).map(Runtime.prettyPrint) + "]"); ');
  421
+            snippet = snippet.substr(0, snippet.length-1) + '}).apply(this, arguments); if (Runtime.debug && typeof ret !== "undefined") Module.print("  [     return:" + Runtime.prettyPrint(ret)); return ret; }';
422 422
           }
423 423
         }
424 424
 

0 notes on commit be26b4a

Please sign in to comment.
Something went wrong with that request. Please try again.