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

This commit is contained in:
Guillermo Bonvehí 2015-01-22 17:38:36 -03:00
parent 36ef0b64a7
commit 5cd28ff71b

View File

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