Missed some locations
authorEd Page <eopage@byu.net>
Mon, 28 Sep 2009 23:00:16 +0000 (18:00 -0500)
committerEd Page <eopage@byu.net>
Mon, 28 Sep 2009 23:00:16 +0000 (18:00 -0500)
src/channel/call.py
src/channel/contact_list.py

index f3aaef5..33ef173 100644 (file)
@@ -4,6 +4,9 @@ import logging
 import telepathy
 
 
 import telepathy
 
 
+_moduleLogger = logging.getLogger("channel.call")
+
+
 class CallChannel(
                telepathy.server.ChannelTypeStreamedMedia,
                telepathy.server.ChannelInterfaceCallState,
 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
                """
 
                @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):
                """
 
        def RequestStreams(self, contact, streamType):
                """
index ec390ff..0d20dc0 100644 (file)
@@ -6,17 +6,20 @@ import telepathy
 import handle
 
 
 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':
 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':
        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':
        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)
        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)
                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:
                                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)
                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:
                                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)
                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:
                                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)
                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:
                                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):
                                        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)
                addressBook = self._conn.gvoice_client
                group = self._handle.group
                addressBook.delete_group(group)