Changeset 122517 in webkit
- Timestamp:
- Jul 12, 2012 3:35:40 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r122513 r122517 1 2012-07-12 Dirk Pranke <dpranke@chromium.org> 2 3 webkitpy: clean up logging handlers, lint common.message_pool 4 https://bugs.webkit.org/show_bug.cgi?id=91152 5 6 Reviewed by Ojan Vafai. 7 8 The unix implementation of multiprocessing clones any logging 9 handlers from the parent process into the child; we currently 10 don't want this behavior in our code, so I was hand-removing the 11 installed handlers in the child process I knew about. After thinking 12 about it further, I think it was simpler and safe enough to just 13 remove all handlers in the child, since the message pool 14 propagates any message from the child back into the parent. 15 16 We can always change this in the future if it turns out to be an issue. 17 18 I'm also fixing a couple of other lint warnings while I'm at it. 19 20 * Scripts/webkitpy/common/message_pool.py: 21 (_MessagePool.__exit__): 22 (_MessagePool._handle_worker_exception): 23 (_Worker._set_up_logging): 24 1 25 2012-07-12 Dirk Pranke <dpranke@chromium.org> 2 26 -
trunk/Tools/Scripts/webkitpy/common/message_pool.py
r122513 r122517 83 83 return self 84 84 85 def __exit__(self, exc_type, exc_value, traceback):85 def __exit__(self, exc_type, exc_value, exc_traceback): 86 86 self._close() 87 87 return False … … 144 144 145 145 @staticmethod 146 def _handle_worker_exception(source, exception_type, exception_value, stack):146 def _handle_worker_exception(source, exception_type, exception_value, _): 147 147 if exception_type == KeyboardInterrupt: 148 148 raise exception_type(exception_value) … … 289 289 self._logger = logging.getLogger() 290 290 291 # The unix multiprocessing implementation clones the MeteredStream log handler292 # into the child process, so we need to remove itto avoid duplicate logging.291 # The unix multiprocessing implementation clones any log handlers into the child process, 292 # so we remove them to avoid duplicate logging. 293 293 for h in self._logger.handlers: 294 # log handlers don't have names until python 2.7. 295 # FIXME: log handler names should be passed in. 296 if getattr(h, 'name', '') in ('MeteredStreamLogHandler', 'webkitpy.test.printer'): 297 self._logger.removeHandler(h) 298 break 294 self._logger.removeHandler(h) 299 295 300 296 self._log_handler = _WorkerLogHandler(self)
Note: See TracChangeset
for help on using the changeset viewer.