Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/candy-chat/candy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Klang <bklang@mojolingo.com>2015-03-24 17:36:57 +0300
committerBen Klang <bklang@mojolingo.com>2015-03-24 17:45:56 +0300
commit04de8e97259d27f4329bf6ebbd8c366f56d22744 (patch)
treea8a1c533a8a4adbd92cc532a5ec4144b69f75634
parentf54ae33298133d4f84d64dc7c1f58700a760d08d (diff)
Use new “warn”-level logger
-rw-r--r--src/core.js6
-rw-r--r--src/core/event.js2
-rw-r--r--src/util.js3
3 files changed, 5 insertions, 6 deletions
diff --git a/src/core.js b/src/core.js
index 5fb5683..a6f2fa8 100644
--- a/src/core.js
+++ b/src/core.js
@@ -514,15 +514,15 @@ Candy.Core = (function(self, Strophe, $) {
*/
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() {
+ self.error = function() {
Function.prototype.apply.call(console.error, console, arguments);
- }
+ };
return self;
}(Candy.Core || {}, Strophe, jQuery));
diff --git a/src/core/event.js b/src/core/event.js
index d3e8e60..48e18b0 100644
--- a/src/core/event.js
+++ b/src/core/event.js
@@ -98,7 +98,7 @@ Candy.Core.Event = (function(self, Strophe, $) {
break;
default:
- Candy.Core.log('[Connection] What?!');
+ Candy.Core.warn('[Connection] Unknown status received:', status);
break;
}
/** Event: candy:core.chat.connection
diff --git a/src/util.js b/src/util.js
index 17a6469..d9810f7 100644
--- a/src/util.js
+++ b/src/util.js
@@ -629,8 +629,7 @@ Candy.Util = (function(self, $){
el.append(self.createHtml(elem.childNodes[i], maxLength, currentLength));
}
} catch(e) { // invalid elements
- Candy.Core.log("[Util:createHtml] Error while parsing XHTML:");
- Candy.Core.log(e);
+ Candy.Core.warn("[Util:createHtml] Error while parsing XHTML:", e);
el = Strophe.xmlTextNode('');
}
} else {