Created
September 1, 2014 20:37
-
-
Save purefan/21cd90050596f0281aff to your computer and use it in GitHub Desktop.
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
var log=function(){for(var a in arguments)if(0==a){if(-1<arguments[a].indexOf("::")&&(arguments[0]="[ "+arguments[a]+" ]"),arguments[0]!=this.logLastCalled){var b="%c "+Array(20).join(" ")+arguments[a]+Array(40-arguments[a].length).join(" "),c="background: #222;color: #bada55;";-1<arguments[0].indexOf("Error ")&&(b=b.replace("Error ",""),c="background: #222; color: #FF0000;");console.log(b,c)}}else"string"==typeof arguments[a]&&-1<arguments[a].indexOf("Yellow:")?console.log("%c "+arguments[a].replace("Yellow:",""),"background: #222, color: #FFFD40;"):console.log(arguments[a]);this.logLastCalled=arguments[0]}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment