Created
February 19, 2017 20:28
-
-
Save alexbowers/455fc1e9fb53a86d4f8df7f1eb810a42 to your computer and use it in GitHub Desktop.
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
let original_console = window.console; | |
let console = Object.create(window.console); | |
console.log = function(msg, formatting) { | |
formatting = formatting || ''; | |
console.groupCollapsed(); | |
console.trace(); | |
original_console.log(msg, formatting); | |
console.groupEnd(); | |
} | |
function force () { | |
try { | |
throw new Error; | |
} catch(e) { | |
console.log('Message'); | |
console.log('%cMessage', 'color: green'); | |
} | |
} | |
function one(a) { | |
two(a); | |
} | |
function two() { | |
force(); | |
} | |
one('string'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment