{"action":"created","issue":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/10150","labels_url":"https://api.github.com/repos/ariya/phantomjs/issues/10150/labels{/name}","comments_url":"https://api.github.com/repos/ariya/phantomjs/issues/10150/comments","events_url":"https://api.github.com/repos/ariya/phantomjs/issues/10150/events","html_url":"https://github.com/ariya/phantomjs/issues/10150","id":12085547,"number":10150,"title":"Redirect console.error to stderr","user":{"login":"gseguin","id":373923,"avatar_url":"https://avatars.githubusercontent.com/u/373923?v=3","gravatar_id":"","url":"https://api.github.com/users/gseguin","html_url":"https://github.com/gseguin","followers_url":"https://api.github.com/users/gseguin/followers","following_url":"https://api.github.com/users/gseguin/following{/other_user}","gists_url":"https://api.github.com/users/gseguin/gists{/gist_id}","starred_url":"https://api.github.com/users/gseguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gseguin/subscriptions","organizations_url":"https://api.github.com/users/gseguin/orgs","repos_url":"https://api.github.com/users/gseguin/repos","events_url":"https://api.github.com/users/gseguin/events{/privacy}","received_events_url":"https://api.github.com/users/gseguin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ariya/phantomjs/labels/2.0","name":"2.0","color":"52a6e0"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/Confirmed","name":"Confirmed","color":"fef2c0"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/Improvement","name":"Improvement","color":"91ca55"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/Need%20code","name":"Need code","color":"FBCA04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2011-06-29T01:04:22Z","updated_at":"2015-07-29T04:36:06Z","closed_at":null,"body":"_**[ghisl...@gmail.com](http://code.google.com/u/101769230304355047543/) commented:**_\r\n> Which version of PhantomJS are you using? 1.1 and 1.2\r\n> \r\n> <b>What steps will reproduce the problem?</b>\n1. Have a webpage with console.error calls in it\r\n> \r\n> <b>What is the expected output? What do you see instead?</b>\nAll output comes to stdout\r\n> \r\n> <b>Which operating system are you using?</b>\n*NIX (OSX and Linux)\r\n> \r\n> <b>Did you use binary PhantomJS or did you compile it from source?</b>\nBoth\r\n\r\n**Disclaimer:**\r\nThis issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, [Issue #150](http://code.google.com/p/phantomjs/issues/detail?id=150).\r\n:star2: &nbsp; **13** people had starred this issue at the time of migration."},"comment":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/comments/125835800","html_url":"https://github.com/ariya/phantomjs/issues/10150#issuecomment-125835800","issue_url":"https://api.github.com/repos/ariya/phantomjs/issues/10150","id":125835800,"user":{"login":"sudotliu","id":4766414,"avatar_url":"https://avatars.githubusercontent.com/u/4766414?v=3","gravatar_id":"","url":"https://api.github.com/users/sudotliu","html_url":"https://github.com/sudotliu","followers_url":"https://api.github.com/users/sudotliu/followers","following_url":"https://api.github.com/users/sudotliu/following{/other_user}","gists_url":"https://api.github.com/users/sudotliu/gists{/gist_id}","starred_url":"https://api.github.com/users/sudotliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudotliu/subscriptions","organizations_url":"https://api.github.com/users/sudotliu/orgs","repos_url":"https://api.github.com/users/sudotliu/repos","events_url":"https://api.github.com/users/sudotliu/events{/privacy}","received_events_url":"https://api.github.com/users/sudotliu/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T04:36:06Z","updated_at":"2015-07-29T04:36:06Z","body":"@kawing-chiu, even with console.warn, it seems like you would still have to apply the same hack with something like:\r\n```javascript\r\nconsole.warn = function () {\r\n    require(\"system\").stderr.write(Array.prototype.join.call(arguments, ' ') + '\\n');\r\n};\r\n```\r\n\r\nDid you actually find a shorter way to do it?"}}