Przeglądaj źródła

Merge pull request #309 from gbonvehi/fix_strophe_log

Strophe.log and .error now calls converse.log, this honors converse.debu...
JC Brand 10 lat temu
rodzic
commit
65b1898f03
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 2 2
      converse.js
  2. 1 0
      docs/CHANGES.rst

+ 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');

+ 1 - 0
docs/CHANGES.rst

@@ -13,6 +13,7 @@ Changelog
 * #295 Document "allow_registration". [gbonvehi]
 * #304 Added Polish translations. [ser]
 * New Makefile.win to build in Windows environments. [gbonvehi]
+* Strophe.log and Strophe.error now uses converse.log to output messages. [gbonvehi]
 
 0.8.6 (2014-12-07)
 ------------------