Merge lp:~deryck/launchpad/fix-checkwatches-logging-661441 into lp:launchpad

Proposed by Deryck Hodge
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11889
Proposed branch: lp:~deryck/launchpad/fix-checkwatches-logging-661441
Merge into: lp:launchpad
Diff against target: 34 lines (+2/-4)
2 files modified
lib/lp/bugs/doc/checkwatches.txt (+1/-3)
lib/lp/bugs/scripts/checkwatches/base.py (+1/-1)
To merge this branch: bzr merge lp:~deryck/launchpad/fix-checkwatches-logging-661441
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+40367@code.launchpad.net

Commit message

[r=lifeless][ui=none][bug=661441] Do checkwatches custom logging to info instead of error to avoid duplicate OOPS reports.

Description of the change

There are duplicate checkwatches OOPS being reported because checkwatches also logs to error when a problem occurs. This branch fixes that by logging to info instead of error. We do want to log something, since the checkwatches logs are often used to debug issues, but logging to info will allow us to collect the info while also preventing the duplicate OOPS reports.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/doc/checkwatches.txt'
2--- lib/lp/bugs/doc/checkwatches.txt 2010-10-18 22:24:59 +0000
3+++ lib/lp/bugs/doc/checkwatches.txt 2010-11-08 18:38:54 +0000
4@@ -154,8 +154,6 @@
5 ... bug_tracker_names=[example_bug_tracker_name])
6 ... finally:
7 ... urllib2.urlopen = urlopen
8- ERROR...Connection timed out when updating ... (OOPS-...)
9-
10 >>> dump_last_oops()
11 Oops-Id: OOPS-...TCW...
12 Exception-Type: timeout
13@@ -275,7 +273,7 @@
14 ... urllib2.urlopen = urlopen
15 DEBUG No global batch size specified.
16 INFO Updating 5 watches for 5 bugs on http://bugs.example.com
17- ERROR Connection timed out when updating ... (OOPS-...)
18+ INFO Connection timed out when updating ... (OOPS-...)
19
20
21 Updating all the watches on a bug tracker
22
23=== modified file 'lib/lp/bugs/scripts/checkwatches/base.py'
24--- lib/lp/bugs/scripts/checkwatches/base.py 2010-10-26 15:47:24 +0000
25+++ lib/lp/bugs/scripts/checkwatches/base.py 2010-11-08 18:38:54 +0000
26@@ -222,7 +222,7 @@
27 oops_info = report_oops(
28 message, properties, info, self._transaction_manager)
29 # Also put it in the log.
30- self.logger.error("%s (%s)" % (message, oops_info.oopsid))
31+ self.logger.info("%s (%s)" % (message, oops_info.oopsid))
32 # Reset statement logging, if enabled.
33 self._statement_logging_reset()
34 # Return the OOPS ID so that we can use it in