Browse Source

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

Guillermo Bonvehí 10 years ago
parent
commit
5cd28ff71b
1 changed files with 2 additions and 2 deletions
  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');