Merge lp://qastaging/~jml/python-fixtures/logger into lp://qastaging/~python-fixtures/python-fixtures/trunk

Proposed by Jonathan Lange
Status: Merged
Merged at revision: 60
Proposed branch: lp://qastaging/~jml/python-fixtures/logger
Merge into: lp://qastaging/~python-fixtures/python-fixtures/trunk
Diff against target: 196 lines (+109/-13)
4 files modified
lib/fixtures/__init__.py (+2/-0)
lib/fixtures/_fixtures/__init__.py (+2/-0)
lib/fixtures/_fixtures/logger.py (+39/-12)
lib/fixtures/tests/_fixtures/test_logger.py (+66/-1)
To merge this branch: bzr merge lp://qastaging/~jml/python-fixtures/logger
Reviewer Review Type Date Requested Status
Robert Collins Approve
Review via email: mp+139867@code.qastaging.launchpad.net

Commit message

Make the logging handler more generic.

Description of the change

Make the logger fixture a bit more generic by parametrizing the handler.

Change the existing logger fixture to use the newer more generic one.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

77 + if self._nuke_handlers:
78 + for handler in reversed(logger.handlers):
79 + logger.removeHandler(handler)
80 + self.addCleanup(logger.addHandler, handler)

line 80 should be before 79 I think.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches