Guest User

Untitled

a guest
Jun 23rd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. //create our logger object
  2. var logger = {
  3. //do we want the app to log things? if not set this to false
  4. logit:true,
  5. info: function(message) {
  6. if (this.logit) {
  7. Ti.API.info(message);
  8. }
  9. },
  10. warn: function(message) {
  11. if (this.logit) {
  12. Ti.API.warn(message);
  13. }
  14. },
  15. error: function(message) {
  16. if (this.logit) {
  17. Ti.API.error(message);
  18. }
  19. }
  20. };
Add Comment
Please, Sign In to add comment