Skip to content

Instantly share code, notes, and snippets.

@dotmaster
dotmaster / gist:726802
Created December 3, 2010 10:23
hijacking Javascript console.log revamped with StackTrace (just Google Chrome)
// usage as usual: console.log('inside coolFunc',this,arguments);
if (typeof console !== "undefined") {
console.logJack = console.log;
window.log={}
window.log.history = window.log.history || {}; // store logs to a global history for reference
console.log=function(){
var timestamp= (new Date); //create a timestamp of the log
var millis=timestamp.getTime();
var readableString=timestamp.toUTCString();