[CalendarServer-changes] [2396] CalendarServer/trunk/twistedcaldav/log.py

source_changes at macosforge.org source_changes at macosforge.org
Thu May 8 16:36:14 PDT 2008


Revision: 2396
          http://trac.macosforge.org/projects/calendarserver/changeset/2396
Author:   wsanchez at apple.com
Date:     2008-05-08 16:36:14 -0700 (Thu, 08 May 2008)

Log Message:
-----------
dreid showed me how to be less dumb about getting the module name out of a class.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/log.py

Modified: CalendarServer/trunk/twistedcaldav/log.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/log.py	2008-05-08 23:20:24 UTC (rev 2395)
+++ CalendarServer/trunk/twistedcaldav/log.py	2008-05-08 23:36:14 UTC (rev 2396)
@@ -200,14 +200,13 @@
         try:
             return self._logger
         except AttributeError:
-            namespace = repr(self.__class__)[8:-2]
+            self._logger = Logger(
+                "%s.%s" % (
+                    self.__class__.__module__,
+                    self.__class__.__name__,
+                )
+            )
 
-            assert repr(self.__class__)[:8] == "<class '"
-            assert repr(self.__class__)[-2:] == "'>"
-            assert namespace.find("'") == -1
-
-            self._logger = Logger(namespace)
-
         return self._logger
 
     def _setLogger(self, value):

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080508/5d7db291/attachment.html


More information about the calendarserver-changes mailing list