Created
March 13, 2014 13:21
-
-
Save perliedman/9528322 to your computer and use it in GitHub Desktop.
Console logging to page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _log = console.log; | |
console.log = function() { | |
var e = document.getElementById('log'), | |
i; | |
for (i = 0; i < arguments.length; i++) { | |
e.innerHTML = e.innerHTML + arguments[i] + '\n'; | |
} | |
_log.apply(console, arguments); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment