diff options
author | Ben Klang <bklang@mojolingo.com> | 2015-03-23 18:25:53 +0300 |
---|---|---|
committer | Ben Klang <bklang@mojolingo.com> | 2015-03-24 17:39:15 +0300 |
commit | f54ae33298133d4f84d64dc7c1f58700a760d08d (patch) | |
tree | 6bcdb6e470aabc08d8562761e66ef715a685c318 | |
parent | 6869080bd7978385dc4604ca479b390917ca83f1 (diff) |
Add warn and error logging levels
-rw-r--r-- | src/core.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core.js b/src/core.js index ad56181..5fb5683 100644 --- a/src/core.js +++ b/src/core.js @@ -508,5 +508,21 @@ Candy.Core = (function(self, Strophe, $) { */ self.log = function() {}; + /** Function: warn + * Print a message to the browser's "info" log + * Enabled regardless of debug mode + */ + self.warn = function() { + Function.prototype.apply.call(console.warn, console, arguments); + } + + /** Function: error + * Print a message to the browser's "error" log + * Enabled regardless of debug mode + */ + self.warn = function() { + Function.prototype.apply.call(console.error, console, arguments); + } + return self; }(Candy.Core || {}, Strophe, jQuery)); |