Skip to content

Instantly share code, notes, and snippets.

@alexshive
Created March 12, 2014 20:40
Show Gist options
  • Save alexshive/9515812 to your computer and use it in GitHub Desktop.
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);
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