Created
January 16, 2016 14:29
-
-
Save specktator/72c774128234466386ac to your computer and use it in GitHub Desktop.
javascript prefixing console.log without affecting line number
This file contains 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
logger = function(){ | |
prefix = "MyApp \u2771\u2771\u2771\u2771 "; | |
this.log = console.log.bind(window.console,prefix); | |
return this; | |
} | |
bugger = new logger(); | |
bugger.log("logging...1"); | |
bugger.log("logging...2"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment