浏览代码

Strophe.log and .error now calls converse.log, this honors converse.debug flag

Guillermo Bonvehí 10 年之前
父节点
当前提交
5cd28ff71b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      converse.js

+ 2 - 2
converse.js

@@ -163,8 +163,8 @@
         var converse = this;
 
         // Logging
-        Strophe.log = function (level, msg) { console.log(level+' '+msg); };
-        Strophe.error = function (msg) { console.log('ERROR: '+msg); };
+        Strophe.log = function (level, msg) { converse.log(level+' '+msg, level); };
+        Strophe.error = function (msg) { converse.log(msg, 'error'); };
 
         // Add Strophe Namespaces
         Strophe.addNamespace('CHATSTATES', 'http://jabber.org/protocol/chatstates');