Created
March 12, 2014 20:40
-
-
Save alexshive/9515812 to your computer and use it in GitHub Desktop.
Titanium log function for quick debugging. Typing out Ti.API.log(JSON.stringify(e)); takes too long. Much easier to type in log(e, 1); or log(e,true);
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
function log(message, parseJSON) { | |
if(parseJSON) { | |
message = JSON.stringify(message); | |
} | |
Ti.API.log(message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment