[CalendarServer-changes] [11725] CalendarServer/branches/users/glyph/log-cleanups/twext/python/log. py

source_changes at macosforge.org source_changes at macosforge.org
Tue Sep 17 16:02:33 PDT 2013


Revision: 11725
          http://trac.calendarserver.org//changeset/11725
Author:   glyph at apple.com
Date:     2013-09-17 16:02:33 -0700 (Tue, 17 Sep 2013)
Log Message:
-----------
various coding standard things

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/log-cleanups/twext/python/log.py

Modified: CalendarServer/branches/users/glyph/log-cleanups/twext/python/log.py
===================================================================
--- CalendarServer/branches/users/glyph/log-cleanups/twext/python/log.py	2013-09-17 23:02:32 UTC (rev 11724)
+++ CalendarServer/branches/users/glyph/log-cleanups/twext/python/log.py	2013-09-17 23:02:33 UTC (rev 11725)
@@ -352,28 +352,24 @@
         @param kwargs: additional keyword parameters to include with
             the event.
         """
-        if level not in LogLevel.iterconstants(): # FIXME: Updated Twisted supports 'in' on constants container
+        # FIXME: Updated Twisted supports 'in' on constants container
+        if level not in LogLevel.iterconstants():
             self.failure(
                 "Got invalid log level {invalidLevel!r} in {logger}.emit().",
                 Failure(InvalidLogLevelError(level)),
-                invalidLevel = level,
-                logger = self,
+                invalidLevel=level,
+                logger=self,
             )
             #level = LogLevel.error
             # FIXME: continue to emit?
             return
 
-        event = kwargs
-        event.update(
-            log_logger    = self,
-            log_level     = level,
-            log_namespace = self.namespace,
-            log_source    = self.source,
-            log_format    = format,
-            log_time      = time.time(),
+        kwargs.update(
+            log_logger=self, log_level=level, log_namespace=self.namespace,
+            log_source=self.source, log_format=format, log_time=time.time(),
         )
 
-        self.publisher(event)
+        self.publisher(kwargs)
 
 
     def failure(self, format, failure=None, level=LogLevel.error, **kwargs):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130917/c1479ebf/attachment.html>


More information about the calendarserver-changes mailing list