=== modified file 'twisted/python/log.py'
--- twisted/python/log.py	2011-08-14 00:01:36 +0000
+++ twisted/python/log.py	2012-06-07 10:01:19 +0000
@@ -513,6 +513,7 @@
     def emit(self, eventDict):
         """
         Receive a twisted log entry, format it and bridge it to python.
+        The event dict is passed along to the logging module using the extra keyword.
 
         By default the logging level used is info; log.err produces error
         level, and you can customize the level by using the C{logLevel} key::
@@ -529,7 +530,8 @@
         text = textFromEventDict(eventDict)
         if text is None:
             return
-        self.logger.log(level, text)
+        del eventDict['message']
+        self.logger.log(level, text, extra=eventDict)
 
     def start(self):
         """
@@ -703,4 +705,3 @@
 except NameError:
     defaultObserver = DefaultObserver()
     defaultObserver.start()
-

=== modified file 'twisted/test/test_log.py'
--- twisted/test/test_log.py	2012-04-08 13:17:05 +0000
+++ twisted/test/test_log.py	2012-05-31 11:49:58 +0000
@@ -504,7 +504,7 @@
         self.assertIn("Hello!", fakeFile.getvalue())
         self.assertIsInstance(sys.stdout, log.StdioOnnaStick)
         self.assertEqual(sys.stdout.isError, False)
-        self.assertEqual(sys.stdout.encoding, 
+        self.assertEqual(sys.stdout.encoding,
                          origStdout.encoding or sys.getdefaultencoding())
         self.assertIsInstance(sys.stderr, log.StdioOnnaStick)
         self.assertEqual(sys.stderr.isError, True)
@@ -607,6 +607,15 @@
         self.lp.msg(message='', isError=False)
         self.assertEqual(self.out.getvalue(), '')
 
+    def test_extraEventDict(self):
+        """
+        Verify that extra eventDict data is passed to stdlib logging as extras.
+        """
+        self.hdlr.setFormatter(logging.Formatter(fmt="%(message)s %(foo)s"))
+        self.lp.msg("Hello World", foo="bar")
+
+        self.assertIn("Hello World", self.out.getvalue())
+        self.assertIn("bar", self.out.getvalue())
 
 class PythonLoggingIntegrationTestCase(unittest.TestCase):
     """
@@ -770,4 +779,3 @@
                          [unicodeString.encode("utf-8"),
                           (u"Also, " + unicodeString).encode("utf-8"),
                           unicodeString.encode("utf-8")])
-

=== added file 'twisted/topfiles/5696.feature'
--- twisted/topfiles/5696.feature	1970-01-01 00:00:00 +0000
+++ twisted/topfiles/5696.feature	2012-06-07 09:58:42 +0000
@@ -0,0 +1,1 @@
+The PythonLoggingObserver now passes additional eventDict data to the logging module using the extra keyword.

