← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~gmb/launchpad/ebt-logging-bug-974586 into lp:launchpad

 

Graham Binns has proposed merging lp:~gmb/launchpad/ebt-logging-bug-974586 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #974586 in Launchpad itself: "bugtracker test logging failures"
  https://bugs.launchpad.net/launchpad/+bug/974586

For more details, see:
https://code.launchpad.net/~gmb/launchpad/ebt-logging-bug-974586/+merge/101720

This branch fixes bug 974586 by making sure that the ExternalBugTracker doctests don't depend on the default logger.

Since I couldn't easily diagnose the problem with the default logger (it's intermittent, may be an isolation problem, and might have something to do with our muting of the logger for certain modules in lp_sitecustomize.py, but those are only hypotheses) I decided that the EBT tests should never have depended on it anyway. We have a FakeLogger class specifically for situations where we need output from a logger but don't need to do end-to-end testing of the logging stack, so I simply made sure that all instances of CheckwatchesMaster created by the tests had a FakeLogger (or in one case a DevNullLogger) as their logger and updated the expected output appropriately.

As a result of this, much of the diff is mechanical in nature.
-- 
https://code.launchpad.net/~gmb/launchpad/ebt-logging-bug-974586/+merge/101720
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~gmb/launchpad/ebt-logging-bug-974586 into lp:launchpad.
=== modified file 'lib/lp/bugs/doc/externalbugtracker-bug-imports.txt'
--- lib/lp/bugs/doc/externalbugtracker-bug-imports.txt	2012-01-24 12:36:15 +0000
+++ lib/lp/bugs/doc/externalbugtracker-bug-imports.txt	2012-04-12 11:50:25 +0000
@@ -47,6 +47,7 @@
 distributions are supported as the bug target.
 
     # Make sane data to play this test.
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.testing.dbuser import lp_dbuser
     >>> from lp.testing.layers import LaunchpadZopelessLayer
 
@@ -63,7 +64,8 @@
     ...     'package': 'evolution',
     ...     'reporter': ("Joe Bloggs", "joe.bloggs@xxxxxxxxxxx")}
     >>> transaction.commit()
-    >>> bug_watch_updater = CheckwatchesMaster(LaunchpadZopelessLayer.txn)
+    >>> bug_watch_updater = CheckwatchesMaster(
+    ...     LaunchpadZopelessLayer.txn, logger=FakeLogger())
     >>> bug = bug_watch_updater.importBug(
     ...     external_bugtracker, bugtracker, debian, '3')
 
@@ -138,7 +140,7 @@
     None
     >>> bug = bug_watch_updater.importBug(
     ...     external_bugtracker, bugtracker, debian, '5')
-    WARNING:...:Unknown debian package (#5 at http://...): no-such-package
+    WARNING Unknown debian package (#5 at http://...): no-such-package
     (OOPS-...)
 
     >>> [added_task] = bug.bugtasks

=== modified file 'lib/lp/bugs/doc/externalbugtracker-bugzilla-oddities.txt'
--- lib/lp/bugs/doc/externalbugtracker-bugzilla-oddities.txt	2011-12-28 17:03:06 +0000
+++ lib/lp/bugs/doc/externalbugtracker-bugzilla-oddities.txt	2012-04-12 11:50:25 +0000
@@ -17,6 +17,7 @@
     >>> from lp.testing.layers import LaunchpadZopelessLayer
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
     >>> from lp.bugs.tests.externalbugtracker import TestIssuezilla
+    >>> from lp.services.log.logger import FakeLogger
     >>> txn = LaunchpadZopelessLayer.txn
     >>> mozilla_bugzilla = getUtility(IBugTrackerSet).getByName('mozilla.org')
     >>> issuezilla = TestIssuezilla(mozilla_bugzilla.baseurl)
@@ -30,11 +31,11 @@
     42: FUBAR BAZBAZ
     42: FUBAR BAZBAZ
     >>> transaction.commit()
-    >>> bug_watch_updater = CheckwatchesMaster(txn)
+    >>> bug_watch_updater = CheckwatchesMaster(txn, logger=FakeLogger())
     >>> bug_watch_updater.updateBugWatches(
     ...     issuezilla, mozilla_bugzilla.watches)
-    INFO:...:Updating 4 watches for 3 bugs on https://bugzilla.mozilla.org
-    INFO:...:Didn't find bug u'42' on https://bugzilla.mozilla.org
+    INFO Updating 4 watches for 3 bugs on https://bugzilla.mozilla.org
+    INFO Didn't find bug u'42' on https://bugzilla.mozilla.org
     (local bugs: 1, 2).
 
     >>> for bug_watch in mozilla_bugzilla.watches:

=== modified file 'lib/lp/bugs/doc/externalbugtracker-bugzilla.txt'
--- lib/lp/bugs/doc/externalbugtracker-bugzilla.txt	2011-12-30 06:14:56 +0000
+++ lib/lp/bugs/doc/externalbugtracker-bugzilla.txt	2012-04-12 11:50:25 +0000
@@ -434,8 +434,9 @@
 done through updateBugWatches(), which expects a list of bug watches to
 update:
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
-    >>> bug_watch_updater = CheckwatchesMaster(txn)
+    >>> bug_watch_updater = CheckwatchesMaster(txn, logger=FakeLogger())
     >>> for bug_watch in gnome_bugzilla.watches:
     ...     print "%s: %s %s" % (bug_watch.remotebug,
     ...           bug_watch.remotestatus,
@@ -444,8 +445,8 @@
     3224:  None
     >>> bug_watch_updater.updateBugWatches(
     ...     external_bugzilla, gnome_bugzilla.watches)
-    INFO:...:Updating 2 watches for 2 bugs on http://bugzilla.gnome.org/bugs
-    INFO:...Didn't find bug u'304070' on
+    INFO Updating 2 watches for 2 bugs on http://bugzilla.gnome.org/bugs
+    INFO Didn't find bug u'304070' on
     http://bugzilla.gnome.org/bugs (local bugs: 15).
 
     >>> for bug_watch in gnome_bugzilla.watches:
@@ -489,15 +490,15 @@
     >>> external_bugzilla.trace_calls = True
     >>> bug_watch_updater.updateBugWatches(
     ...     external_bugzilla, gnome_bugzilla.watches)
-    INFO:...:Updating 7 watches for 7 bugs on http://bugzilla.gnome.org/bugs
-    CALLED _postPage()
-    CALLED _postPage()
-    CALLED _postPage()
-    CALLED _postPage()
-    CALLED _postPage()
-    CALLED _postPage()
-    CALLED _postPage()
-    INFO:...:Didn't find bug u'304070' on
+    INFO Updating 7 watches for 7 bugs on http://bugzilla.gnome.org/bugs
+    CALLED _postPage()
+    CALLED _postPage()
+    CALLED _postPage()
+    CALLED _postPage()
+    CALLED _postPage()
+    CALLED _postPage()
+    CALLED _postPage()
+    INFO Didn't find bug u'304070' on
     http://bugzilla.gnome.org/bugs (local bugs: 15).
 
     >>> remote_statuses = dict(
@@ -543,9 +544,9 @@
     >>> external_bugzilla.trace_calls = True
     >>> bug_watch_updater.updateBugWatches(
     ...     external_bugzilla, gnome_bugzilla.watches)
-    INFO:...:Updating 207 watches for 207 bugs...
+    INFO Updating 207 watches for 207 bugs...
     CALLED _postPage()
-    INFO:...:Didn't find bug u'304070' on
+    INFO Didn't find bug u'304070' on
     http://bugzilla.gnome.org/bugs (local bugs: 15).
 
     >>> remote_statuses = dict(
@@ -580,7 +581,7 @@
     >>> bug_watch.lastchanged = now - timedelta(weeks=2)
     >>> old_last_changed = bug_watch.lastchanged
     >>> bug_watch_updater.updateBugWatches(external_bugzilla, [bug_watch])
-    INFO:...:Updating 1 watches for 1 bugs on http://bugzilla.gnome.org/bugs
+    INFO Updating 1 watches for 1 bugs on http://bugzilla.gnome.org/bugs
     >>> bug_watch.lastchanged == old_last_changed
     True
 
@@ -617,7 +618,7 @@
 
     >>> bug_watch_updater.updateBugWatches(
     ...     external_bugzilla, [thunderbird_task.bugwatch])
-    INFO:...:Updating 1 watches for 1 bugs on https://bugzilla.mozilla.org
+    INFO Updating 1 watches for 1 bugs on https://bugzilla.mozilla.org
 
     >>> bug_nine = getUtility(IBugSet).get(9)
     >>> thunderbird_task = bug_nine.bugtasks[0]
@@ -640,7 +641,7 @@
     ...     getUtility(IPersonSet).getByName('no-priv'))
     >>> bug_watch_updater.updateBugWatches(
     ...     external_bugzilla, [thunderbird_task.bugwatch])
-    INFO:...:Updating 1 watches for 1 bugs on https://bugzilla.mozilla.org
+    INFO Updating 1 watches for 1 bugs on https://bugzilla.mozilla.org
 
     >>> bug_nine = getUtility(IBugSet).get(9)
     >>> thunderbird_task = bug_nine.bugtasks[0]
@@ -669,7 +670,7 @@
     >>> bug_watch2_id = bug_watch2.id
     >>> bug_watch_updater.updateBugWatches(
     ...     external_bugzilla, [bug_watch1, bug_watch2])
-    INFO:...:Updating 2 watches for 1 bugs on https://bugzilla.mozilla.org
+    INFO Updating 2 watches for 1 bugs on https://bugzilla.mozilla.org
 
     >>> bug_watch1 = getUtility(IBugWatchSet).get(bug_watch1_id)
     >>> print bug_watch1.remotestatus

=== modified file 'lib/lp/bugs/doc/externalbugtracker-comment-imports.txt'
--- lib/lp/bugs/doc/externalbugtracker-comment-imports.txt	2012-01-04 03:23:19 +0000
+++ lib/lp/bugs/doc/externalbugtracker-comment-imports.txt	2012-04-12 11:50:25 +0000
@@ -84,16 +84,16 @@
 comment-importing ExternalBugTracker instance will result in the three
 comments in the comment_dict being imported into Launchpad.
 
-    >>> from lp.services.scripts.logger import log
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.bugs.scripts.checkwatches.core import CheckwatchesMaster
     >>> from lp.bugs.scripts.checkwatches.tests.test_bugwatchupdater import (
     ...     make_bug_watch_updater)
 
     >>> bugwatch_updater = make_bug_watch_updater(
-    ...     CheckwatchesMaster(transaction), bug_watch,
-    ...     external_bugtracker)
+    ...     CheckwatchesMaster(transaction, logger=FakeLogger()),
+    ...     bug_watch, external_bugtracker)
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 3 comments for remote bug 123456 on ...
+    INFO Imported 3 comments for remote bug 123456 on ...
 
 These three comments will be linked to the bug watch from which they
 were imported. They also have the remote_comment_id attribute set.
@@ -123,7 +123,7 @@
     >>> transaction.commit()
 
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 1 comments for remote bug 123456 on ...
+    INFO Imported 1 comments for remote bug 123456 on ...
 
 Once again, the newly-imported comment will be linked to the bug watch
 form which it was imported.
@@ -174,7 +174,7 @@
     >>> transaction.commit()
 
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 1 comments for remote bug 123456 on ...
+    INFO Imported 1 comments for remote bug 123456 on ...
 
     >>> bug.messages[-1].owner.name
     u'no-priv'
@@ -192,7 +192,7 @@
     >>> transaction.commit()
 
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 1 comments for remote bug 123456 on ...
+    INFO Imported 1 comments for remote bug 123456 on ...
 
     >>> bug.messages[-1].owner.name
     u'noemail-bugzilla-checkwatches-1'
@@ -217,9 +217,9 @@
     >>> transaction.commit()
 
     >>> bugwatch_updater.importBugComments()
-    WARNING:...:Unable to import remote comment author. No email address
+    WARNING Unable to import remote comment author. No email address
     or display name found. (OOPS-...)
-    INFO:...:Imported 0 comments for remote bug 123456 on ...
+    INFO Imported 0 comments for remote bug 123456 on ...
 
     >>> print bug.messages[-1].text_contents
     Yet another comment.
@@ -387,10 +387,10 @@
     >>> external_bugtracker.remote_comments = {
     ...     '5':"A comment containing a CVE entry: CVE-1991-9911."}
     >>> bugwatch_updater = make_bug_watch_updater(
-    ...     CheckwatchesMaster(transaction), bug_watch,
-    ...     external_bugtracker)
+    ...     CheckwatchesMaster(transaction, logger=FakeLogger()),
+    ...     bug_watch, external_bugtracker)
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 1 comments for remote bug 123456...
+    INFO Imported 1 comments for remote bug 123456...
 
     >>> for cve in bug_watch.bug.cves:
     ...     print cve.displayname
@@ -412,7 +412,7 @@
     >>> transaction.commit()
 
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 1 comments for remote bug 123456...
+    INFO Imported 1 comments for remote bug 123456...
 
     >>> for cve in sorted([cve.displayname for cve in bug_watch.bug.cves]):
     ...     print cve
@@ -460,10 +460,10 @@
     >>> transaction.commit()
 
     >>> bugwatch_updater = make_bug_watch_updater(
-    ...     CheckwatchesMaster(transaction), bug_watch,
-    ...     external_bugtracker)
+    ...     CheckwatchesMaster(transaction, logger=FakeLogger()),
+    ...     bug_watch, external_bugtracker)
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 2 comments for remote bug 42 ...
+    INFO Imported 2 comments for remote bug 42 ...
 
     >>> notifications = get_new_notifications(bug=bug_watch.bug)
     >>> len(notifications)
@@ -519,7 +519,7 @@
     >>> transaction.commit()
 
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 2 comments for remote bug 42 ...
+    INFO Imported 2 comments for remote bug 42 ...
 
     >>> notifications = get_new_notifications(bug_watch.bug)
     >>> len(notifications)

=== modified file 'lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt'
--- lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt	2012-01-20 16:11:11 +0000
+++ lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt	2012-04-12 11:50:25 +0000
@@ -92,17 +92,18 @@
 each Launchpad comment that needs to be pushed to the remote bug
 tracker.
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.bugs.scripts.checkwatches.core import CheckwatchesMaster
     >>> from lp.bugs.scripts.checkwatches.tests.test_bugwatchupdater import (
     ...     make_bug_watch_updater)
 
     >>> bugwatch_updater = make_bug_watch_updater(
-    ...     CheckwatchesMaster(transaction), bug_watch,
-    ...     external_bugtracker)
+    ...     CheckwatchesMaster(transaction, logger=FakeLogger()),
+    ...     bug_watch, external_bugtracker)
 
     >>> bugwatch_updater.pushBugComments()
     Comment added as remote comment 1
-    INFO:...:Pushed 1 comments to remote bug 1234 on ...
+    INFO Pushed 1 comments to remote bug 1234 on ...
 
 The comment that we pushed to the remote bug will now have a
 remote_comment_id.
@@ -148,7 +149,7 @@
     >>> bugwatch_updater.pushBugComments()
     Comment added as remote comment 2
     Comment added as remote comment 3
-    INFO:...:Pushed 2 comments to remote bug 1234 on ...
+    INFO Pushed 2 comments to remote bug 1234 on ...
 
     >>> print_bug_messages(bug, bug_watch)
     1: Pushing, for the purpose of.
@@ -218,7 +219,7 @@
 
     >>> bugwatch_updater.external_bugtracker = external_bugtracker
     >>> bugwatch_updater.importBugComments()
-    INFO:...:Imported 3 comments for remote bug 1234 on ...
+    INFO Imported 3 comments for remote bug 1234 on ...
 
 Each of the imported comments has its remote_comment_id field set.
 
@@ -256,8 +257,8 @@
     ...     'http://example.com')
 
     >>> bugwatch_updater = make_bug_watch_updater(
-    ...     CheckwatchesMaster(transaction), bug_watch,
-    ...     external_bugtracker)
+    ...     CheckwatchesMaster(transaction, logger=FakeLogger()),
+    ...     bug_watch, external_bugtracker)
     >>> bugwatch_updater.external_bugtracker = broken_external_bugtracker
     >>> bugwatch_updater.pushBugComments()
     Traceback (most recent call last):

=== modified file 'lib/lp/bugs/doc/externalbugtracker-debbugs.txt'
--- lib/lp/bugs/doc/externalbugtracker-debbugs.txt	2012-03-27 13:38:04 +0000
+++ lib/lp/bugs/doc/externalbugtracker-debbugs.txt	2012-04-12 11:50:25 +0000
@@ -120,12 +120,13 @@
 
     >>> transaction.commit()
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
-    >>> bug_watch_updater = CheckwatchesMaster(txn)
+    >>> bug_watch_updater = CheckwatchesMaster(txn, logger=FakeLogger())
     >>> external_debbugs.sync_comments = False
     >>> bug_watch_ids = sorted([bug_watch.id for bug_watch in bug_watches])
     >>> bug_watch_updater.updateBugWatches(external_debbugs, bug_watches)
-    INFO:...:Updating 5 watches for 5 bugs on http://...
+    INFO Updating 5 watches for 5 bugs on http://...
 
     >>> from lp.bugs.interfaces.bugwatch import IBugWatchSet
     >>> for bug_watch_id in bug_watch_ids:

=== modified file 'lib/lp/bugs/doc/externalbugtracker-linking-back.txt'
--- lib/lp/bugs/doc/externalbugtracker-linking-back.txt	2012-01-20 15:42:44 +0000
+++ lib/lp/bugs/doc/externalbugtracker-linking-back.txt	2012-04-12 11:50:25 +0000
@@ -46,8 +46,10 @@
     >>> txn.commit()
     >>> switch_dbuser('checkwatches')
 
+    >>> from lp.services.log.logger import DevNullLogger
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
-    >>> checkwatches_master = CheckwatchesMaster(txn)
+    >>> checkwatches_master = CheckwatchesMaster(
+    ...     txn, logger=DevNullLogger())
     >>> txn.commit()
 
     >>> external_bugtracker = BackLinkingExternalBugTracker(
@@ -91,13 +93,13 @@
 
     >>> transaction.commit()
 
-    >>> from lp.bugs.scripts.checkwatches.core import CheckwatchesMaster
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.bugs.scripts.checkwatches.tests.test_bugwatchupdater import (
     ...     make_bug_watch_updater)
 
     >>> bug_watch_updater = make_bug_watch_updater(
-    ...     CheckwatchesMaster(transaction), bug_watch,
-    ...     external_bugtracker)
+    ...     CheckwatchesMaster(transaction, logger=FakeLogger()),
+    ...     bug_watch, external_bugtracker)
     >>> bug_watch_updater.linkLaunchpadBug()
     Getting Launchpad id for bug 42
 

=== modified file 'lib/lp/bugs/doc/externalbugtracker-mantis-csv.txt'
--- lib/lp/bugs/doc/externalbugtracker-mantis-csv.txt	2011-12-30 06:14:56 +0000
+++ lib/lp/bugs/doc/externalbugtracker-mantis-csv.txt	2012-04-12 11:50:25 +0000
@@ -80,11 +80,13 @@
 
     >>> transaction.commit()
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
-    >>> bug_watch_updater = CheckwatchesMaster(transaction)
+    >>> bug_watch_updater = CheckwatchesMaster(
+    ...     transaction, logger=FakeLogger())
     >>> bug_watch_updater.updateBugWatches(
     ...     example_ext_bug_tracker, example_bug_tracker.watches)
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
 
     >>> for bug_watch in example_bug_tracker.watches:
     ...     print "%s: %s" % (bug_watch.remotebug, bug_watch.remotestatus)
@@ -128,7 +130,7 @@
     >>> example_ext_bug_tracker.trace_calls = True
     >>> bug_watch_updater.updateBugWatches(
     ...     example_ext_bug_tracker, example_bug_tracker.watches)
-    INFO:...:Updating 6 watches for 6 bugs on http://bugs.some.where
+    INFO Updating 6 watches for 6 bugs on http://bugs.some.where
     CALLED _postPage('view_all_set.php?f=3', ...)
     CALLED _getPage('csv_export.php')
 
@@ -183,7 +185,7 @@
     >>> old_last_changed = bug_watch.lastchanged
     >>> bug_watch_updater.updateBugWatches(
     ...     example_ext_bug_tracker, [bug_watch])
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
 
     >>> bug_watch.lastchanged == old_last_changed
     True

=== modified file 'lib/lp/bugs/doc/externalbugtracker-mantis.txt'
--- lib/lp/bugs/doc/externalbugtracker-mantis.txt	2011-12-30 06:14:56 +0000
+++ lib/lp/bugs/doc/externalbugtracker-mantis.txt	2012-04-12 11:50:25 +0000
@@ -80,13 +80,15 @@
 
     >>> transaction.commit()
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.testing.layers import LaunchpadZopelessLayer
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
     >>> txn = LaunchpadZopelessLayer.txn
-    >>> bug_watch_updater = CheckwatchesMaster(txn)
+    >>> bug_watch_updater = CheckwatchesMaster(
+    ...     txn, logger=FakeLogger())
     >>> bug_watch_updater.updateBugWatches(
     ...     example_ext_bug_tracker, example_bug_tracker.watches)
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
 
     >>> for bug_watch in example_bug_tracker.watches:
     ...     print "%s: %s" % (bug_watch.remotebug, bug_watch.remotestatus)
@@ -135,14 +137,14 @@
     >>> bug_watch_updater.updateBugWatches(
     ...     example_ext_bug_tracker,
     ...     sorted(example_bug_tracker.watches, key=getid))
-    INFO:...:Updating 7 watches for 6 bugs on http://bugs.some.where
+    INFO Updating 7 watches for 6 bugs on http://bugs.some.where
     CALLED _getPage(u'view.php?id=1550')
     CALLED _getPage(u'view.php?id=1679')
     CALLED _getPage(u'view.php?id=1730')
     CALLED _getPage(u'view.php?id=1738')
     CALLED _getPage(u'view.php?id=1748')
     CALLED _getPage(u'view.php?id=1798')
-    INFO:...:Didn't find bug u'1798' on http://bugs.some.where
+    INFO Didn't find bug u'1798' on http://bugs.some.where
     (local bugs: 10).
 
     >>> remote_statuses = dict(
@@ -197,7 +199,7 @@
     >>> old_last_changed = bug_watch.lastchanged
     >>> bug_watch_updater.updateBugWatches(
     ...     example_ext_bug_tracker, [bug_watch])
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
 
     >>> bug_watch.lastchanged == old_last_changed
     True

=== modified file 'lib/lp/bugs/doc/externalbugtracker-roundup.txt'
--- lib/lp/bugs/doc/externalbugtracker-roundup.txt	2011-12-28 17:03:06 +0000
+++ lib/lp/bugs/doc/externalbugtracker-roundup.txt	2012-04-12 11:50:25 +0000
@@ -138,14 +138,16 @@
 
     >>> transaction.commit()
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.testing.layers import LaunchpadZopelessLayer
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
     >>> txn = LaunchpadZopelessLayer.txn
-    >>> bug_watch_updater = CheckwatchesMaster(txn)
+    >>> bug_watch_updater = CheckwatchesMaster(
+    ...     txn, logger=FakeLogger())
     >>> roundup = TestRoundup(example_bug_tracker.baseurl)
     >>> bug_watch_updater.updateBugWatches(
     ...     roundup, example_bug_tracker.watches)
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
     >>> print_bugwatches(example_bug_tracker.watches)
     Remote bug 1: 1
 
@@ -179,7 +181,7 @@
     >>> roundup.trace_calls = True
     >>> bug_watch_updater.updateBugWatches(
     ...     roundup, example_bug_tracker.watches)
-    INFO:...:Updating 11 watches for 11 bugs on http://bugs.some.where
+    INFO Updating 11 watches for 11 bugs on http://bugs.some.where
     CALLED urlopen(u'http://.../issue?...@startwith=0')
 
     >>> print_bugwatches(example_bug_tracker.watches,

=== modified file 'lib/lp/bugs/doc/externalbugtracker-rt.txt'
--- lib/lp/bugs/doc/externalbugtracker-rt.txt	2011-12-28 17:03:06 +0000
+++ lib/lp/bugs/doc/externalbugtracker-rt.txt	2012-04-12 11:50:25 +0000
@@ -191,13 +191,15 @@
 
     >>> transaction.commit()
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.testing.layers import LaunchpadZopelessLayer
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
     >>> txn = LaunchpadZopelessLayer.txn
-    >>> bug_watch_updater = CheckwatchesMaster(txn)
+    >>> bug_watch_updater = CheckwatchesMaster(
+    ...     txn, logger=FakeLogger())
     >>> rt = TestRequestTracker(example_bug_tracker.baseurl)
     >>> bug_watch_updater.updateBugWatches(rt, example_bug_tracker.watches)
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
 
     >>> print_bugwatches(example_bug_tracker.watches)
     Remote bug 1585: new
@@ -225,7 +227,7 @@
 
     >>> rt.trace_calls = True
     >>> bug_watch_updater.updateBugWatches(rt, example_bug_tracker.watches)
-    INFO:...:Updating 5 watches for 5 bugs on http://bugs.some.where
+    INFO Updating 5 watches for 5 bugs on http://bugs.some.where
     CALLED urlopen(u'REST/1.0/search/ticket/')
 
 The bug statuses have now been imported from the Example.com bug

=== modified file 'lib/lp/bugs/doc/externalbugtracker-sourceforge.txt'
--- lib/lp/bugs/doc/externalbugtracker-sourceforge.txt	2011-12-28 17:03:06 +0000
+++ lib/lp/bugs/doc/externalbugtracker-sourceforge.txt	2012-04-12 11:50:25 +0000
@@ -161,14 +161,16 @@
 
     >>> transaction.commit()
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.testing.layers import LaunchpadZopelessLayer
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
     >>> txn = LaunchpadZopelessLayer.txn
-    >>> bug_watch_updater = CheckwatchesMaster(txn)
+    >>> bug_watch_updater = CheckwatchesMaster(
+    ...     txn, logger=FakeLogger())
     >>> sourceforge = TestSourceForge(example_bug_tracker.baseurl)
     >>> bug_watch_updater.updateBugWatches(
     ...     sourceforge, example_bug_tracker.watches)
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
     >>> print_bugwatches(example_bug_tracker.watches)
     Remote bug 1722250: Open:None
 
@@ -210,7 +212,7 @@
     >>> sourceforge.trace_calls = True
     >>> bug_watch_updater.updateBugWatches(
     ...     sourceforge, sorted(example_bug_tracker.watches))
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
     CALLED _getPage(u'support/tracker.php?aid=1722251')
 
 For the sake of this test we can set the bug tracker's batch_size to
@@ -219,7 +221,7 @@
     >>> sourceforge.batch_size = None
     >>> bug_watch_updater.updateBugWatches(
     ...     sourceforge, example_bug_tracker.watches)
-    INFO:...:Updating 10 watches for 10 bugs on http://bugs.some.where
+    INFO Updating 10 watches for 10 bugs on http://bugs.some.where
     CALLED _getPage(u'support/tracker.php?aid=1722250')
     CALLED _getPage(u'support/tracker.php?aid=1722251')
     CALLED _getPage(u'support/tracker.php?aid=1722252')

=== modified file 'lib/lp/bugs/doc/externalbugtracker-trac.txt'
--- lib/lp/bugs/doc/externalbugtracker-trac.txt	2011-12-28 17:03:06 +0000
+++ lib/lp/bugs/doc/externalbugtracker-trac.txt	2012-04-12 11:50:25 +0000
@@ -316,13 +316,15 @@
 
     >>> transaction.commit()
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.testing.layers import LaunchpadZopelessLayer
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
     >>> txn = LaunchpadZopelessLayer.txn
-    >>> bug_watch_updater = CheckwatchesMaster(txn)
+    >>> bug_watch_updater = CheckwatchesMaster(
+    ...     txn, FakeLogger())
     >>> trac = TestTrac(example_bug_tracker.baseurl)
     >>> bug_watch_updater.updateBugWatches(trac, example_bug_tracker.watches)
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
 
     >>> for bug_watch in example_bug_tracker.watches:
     ...     print "%s: %s" % (bug_watch.remotebug, bug_watch.remotestatus)
@@ -365,7 +367,7 @@
 
     >>> trac.trace_calls = True
     >>> bug_watch_updater.updateBugWatches(trac, example_bug_tracker.watches)
-    INFO:...:Updating 12 watches for 12 bugs on http://bugs.some.where
+    INFO Updating 12 watches for 12 bugs on http://bugs.some.where
     CALLED urlopen(u'http://.../query?id=...
 
     >>> for remote_bug_id in sorted(bug_watches.keys()):
@@ -416,7 +418,7 @@
     >>> trac.batch_query_threshold = 0
     >>> trac.trace_calls = False
     >>> bug_watch_updater.updateBugWatches(trac, [bug_watch])
-    INFO:...:Updating 1 watches for 1 bugs on http://bugs.some.where
+    INFO Updating 1 watches for 1 bugs on http://bugs.some.where
 
     >>> bug_watch.lastchanged == old_last_changed
     True

=== modified file 'lib/lp/bugs/doc/externalbugtracker.txt'
--- lib/lp/bugs/doc/externalbugtracker.txt	2011-12-29 05:29:36 +0000
+++ lib/lp/bugs/doc/externalbugtracker.txt	2012-04-12 11:50:25 +0000
@@ -29,10 +29,13 @@
     ...         print "initializeRemoteBugDB() called: %r" % (
     ...             remote_bug_ids, )
 
+    >>> from lp.services.log.logger import FakeLogger
     >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
-    >>> bug_watch_updater = CheckwatchesMaster(transaction)
+    >>> bug_watch_updater = CheckwatchesMaster(
+    ...     transaction, logger=FakeLogger())
     >>> bug_watch_updater.updateBugWatches(
     ...     InitializingExternalBugTracker(), [])
+    INFO Updating 0 watches for 0 bugs on http://example.com
     initializeRemoteBugDB() called: []
 
 
@@ -403,11 +406,12 @@
     ...     sync_comments = True
 
     >>> checkwatches_master = CheckwatchesMaster(
-    ...     transaction, syncable_gnome_products=[])
+    ...     transaction, syncable_gnome_products=[],
+    ...     logger=FakeLogger())
     >>> remote_bug_updater = checkwatches_master.remote_bug_updater_factory(
     ...     checkwatches_master, CommentImportExternalBugTracker(), '1',
     ...     [], [], server_time=None)
-    WARNING:...:Comment importing supported, but server time can't be
+    WARNING Comment importing supported, but server time can't be
                 trusted. No comments will be imported. (OOPS-...)