# HG changeset patch # User souliane # Date 1413642517 -7200 # Node ID 8b891f9be183a7dcdddbb0c17bd4acbe829d10e3 # Parent 84d06701f5c4475e82a99d1219f12d7f9afb5c85 core, plugins: improve a bit some log messages diff -r 84d06701f5c4 -r 8b891f9be183 src/core/xmpp.py --- a/src/core/xmpp.py Sun Oct 19 12:31:28 2014 +0200 +++ b/src/core/xmpp.py Sat Oct 18 16:28:37 2014 +0200 @@ -237,11 +237,14 @@ # may change in the future self.removeItem(item.jid) return - log.info(_("new contact in roster list: %s") % item.jid.full()) + log.debug(_("New contact in roster list: %s") % item.jid.full()) if not item.subscriptionTo: - log.warning(_("You are not subscribed to this contact !")) + if not item.subscriptionFrom: + log.info(_("There's no subscription between you and [%s]!") % item.jid.full()) + else: + log.info(_("You are not subscribed to [%s]!") % item.jid.full()) if not item.subscriptionFrom: - log.warning(_("This contact is not subscribed to you !")) + log.info(_("[%s] is not subscribed to you!") % item.jid.full()) #self.host.memory.addContact(item.jid, item_attr, item.groups, self.parent.profile) bare_jid = item.jid.userhostJID() diff -r 84d06701f5c4 -r 8b891f9be183 src/plugins/plugin_sec_otr.py --- a/src/plugins/plugin_sec_otr.py Sun Oct 19 12:31:28 2014 +0200 +++ b/src/plugins/plugin_sec_otr.py Sat Oct 18 16:28:37 2014 +0200 @@ -188,7 +188,7 @@ def getContextForUser(self, other): log.debug(u"getContextForUser [%s]" % other) if not other.resource: - log.warning("getContextForUser called with a bare jid") + log.warning("getContextForUser called with a bare jid: %s" % other.full()) return self.startContext(other) diff -r 84d06701f5c4 -r 8b891f9be183 src/plugins/plugin_xep_0054.py --- a/src/plugins/plugin_xep_0054.py Sun Oct 19 12:31:28 2014 +0200 +++ b/src/plugins/plugin_xep_0054.py Sat Oct 18 16:28:37 2014 +0200 @@ -143,7 +143,7 @@ """Parse a elem and save the picture""" for elem in photo_xml.elements(): if elem.name == 'TYPE': - log.info(_('Photo of type [%s] found') % str(elem)) + log.debug(_('Photo of type [%s] found') % str(elem)) if elem.name == 'BINVAL': log.debug(_('Decoding binary')) decoded = b64decode(str(elem)) diff -r 84d06701f5c4 -r 8b891f9be183 src/plugins/plugin_xep_0060.py --- a/src/plugins/plugin_xep_0060.py Sun Oct 19 12:31:28 2014 +0200 +++ b/src/plugins/plugin_xep_0060.py Sat Oct 18 16:28:37 2014 +0200 @@ -177,7 +177,7 @@ d_dict = {} for publisher, node in data.items(): if node not in found_nodes: - log.info("Skip the items retrieval for [{node}]: node doesn't exist".format(node=node)) + log.debug("Skip the items retrieval for [{node}]: node doesn't exist".format(node=node)) continue # avoid pubsub "item-not-found" error d_dict[publisher] = client.items(service, node, max_items, item_ids, sub_id, client.parent.jid) defer.returnValue(d_dict) @@ -223,7 +223,7 @@ d_list = [] for nodeIdentifier in (set(nodeIdentifiers) - set(subscribed_nodes)): if nodeIdentifier not in found_nodes: - log.info("Skip the subscription to [{node}]: node doesn't exist".format(node=nodeIdentifier)) + log.debug("Skip the subscription to [{node}]: node doesn't exist".format(node=nodeIdentifier)) continue # avoid sat-pubsub "SubscriptionExists" error d_list.append(client.subscribe(service, nodeIdentifier, sub_jid or client.parent.jid.userhostJID(), options=options)) defer.returnValue(d_list) diff -r 84d06701f5c4 -r 8b891f9be183 src/plugins/plugin_xep_0115.py --- a/src/plugins/plugin_xep_0115.py Sun Oct 19 12:31:28 2014 +0200 +++ b/src/plugins/plugin_xep_0115.py Sat Oct 18 16:28:37 2014 +0200 @@ -140,7 +140,7 @@ c_hash = c_elem['hash'] c_node = c_elem['node'] except KeyError: - log.warning(_('Received invalid capabilities tag')) + log.warning(_('Received invalid capabilities tag: %s') % c_elem.toXml()) return if c_ver in self.host.memory.disco.hashes: