From ef6fe3efd8ae85a47b16d9f50473b8b15ebc613d Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 28 Sep 2009 18:00:16 -0500 Subject: [PATCH] Missed some locations --- src/channel/call.py | 5 ++++- src/channel/contact_list.py | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/channel/call.py b/src/channel/call.py index f3aaef5..33ef173 100644 --- a/src/channel/call.py +++ b/src/channel/call.py @@ -4,6 +4,9 @@ import logging import telepathy +_moduleLogger = logging.getLogger("channel.call") + + class CallChannel( telepathy.server.ChannelTypeStreamedMedia, telepathy.server.ChannelInterfaceCallState, @@ -39,7 +42,7 @@ class CallChannel( @note Since streams are short lived, not bothering to implement this """ - logging.info("A request was made to change the stream direction") + _moduleLogger.info("A request was made to change the stream direction") def RequestStreams(self, contact, streamType): """ diff --git a/src/channel/contact_list.py b/src/channel/contact_list.py index ec390ff..0d20dc0 100644 --- a/src/channel/contact_list.py +++ b/src/channel/contact_list.py @@ -6,17 +6,20 @@ import telepathy import handle +_moduleLogger = logging.getLogger("channel.contact_list") + + def create_contact_list_channel(connection, h): if h.get_name() == 'subscribe': channel_class = SubscribeListChannel elif h.get_name() == 'publish': channel_class = PublishListChannel elif h.get_name() == 'hide': - logging.warn("Unsuported type %s" % h.get_name()) + _moduleLogger.warn("Unsuported type %s" % h.get_name()) elif h.get_name() == 'allow': - logging.warn("Unsuported type %s" % h.get_name()) + _moduleLogger.warn("Unsuported type %s" % h.get_name()) elif h.get_name() == 'deny': - logging.warn("Unsuported type %s" % h.get_name()) + _moduleLogger.warn("Unsuported type %s" % h.get_name()) else: raise TypeError("Unknown list type : " + h.get_name()) return channel_class(connection, h) @@ -127,7 +130,7 @@ class GroupChannel(AbstractListChannel): if self._handle.group is None: for contactHandleId in contacts: contactHandle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, contactHandleId) - logging.info("Adding contact %r to pending group %r" % (contactHandle, self._handle)) + _moduleLogger.info("Adding contact %r to pending group %r" % (contactHandle, self._handle)) if contactHandleId in self.__pending_remove: self.__pending_remove.remove(contactHandleId) else: @@ -136,7 +139,7 @@ class GroupChannel(AbstractListChannel): else: for contactHandleId in contacts: contactHandle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, contactHandleId) - logging.info("Adding contact %r to group %r" % (contactHandle, self._handle)) + _moduleLogger.info("Adding contact %r to group %r" % (contactHandle, self._handle)) contact = contactHandle.contact group = self._handle.group if contact is not None: @@ -149,7 +152,7 @@ class GroupChannel(AbstractListChannel): if self._handle.group is None: for contactHandleId in contacts: contactHandle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, contactHandleId) - logging.info("Adding contact %r to pending group %r" % (contactHandle, self._handle)) + _moduleLogger.info("Adding contact %r to pending group %r" % (contactHandle, self._handle)) if contactHandleId in self.__pending_add: self.__pending_add.remove(contactHandleId) else: @@ -158,7 +161,7 @@ class GroupChannel(AbstractListChannel): else: for contactHandleId in contacts: contactHandle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, contactHandleId) - logging.info("Removing contact %r from pending group %r" % (contactHandle, self._handle)) + _moduleLogger.info("Removing contact %r from pending group %r" % (contactHandle, self._handle)) contact = contactHandle.contact group = self._handle.group if contact is not None: @@ -167,7 +170,7 @@ class GroupChannel(AbstractListChannel): contactHandle.pending_groups.discard(group) def Close(self): - logging.debug("Deleting group %s" % self._handle.name) + _moduleLogger.debug("Deleting group %s" % self._handle.name) addressBook = self._conn.gvoice_client group = self._handle.group addressBook.delete_group(group) -- 1.7.9.5