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
=== modified file 'lib/lp/bugs/doc/checkwatches.txt'
--- lib/lp/bugs/doc/checkwatches.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/bugs/doc/checkwatches.txt 2010-11-08 18:38:54 +0000
@@ -154,8 +154,6 @@
154 ... bug_tracker_names=[example_bug_tracker_name])154 ... bug_tracker_names=[example_bug_tracker_name])
155 ... finally:155 ... finally:
156 ... urllib2.urlopen = urlopen156 ... urllib2.urlopen = urlopen
157 ERROR...Connection timed out when updating ... (OOPS-...)
158
159 >>> dump_last_oops()157 >>> dump_last_oops()
160 Oops-Id: OOPS-...TCW...158 Oops-Id: OOPS-...TCW...
161 Exception-Type: timeout159 Exception-Type: timeout
@@ -275,7 +273,7 @@
275 ... urllib2.urlopen = urlopen273 ... urllib2.urlopen = urlopen
276 DEBUG No global batch size specified.274 DEBUG No global batch size specified.
277 INFO Updating 5 watches for 5 bugs on http://bugs.example.com275 INFO Updating 5 watches for 5 bugs on http://bugs.example.com
278 ERROR Connection timed out when updating ... (OOPS-...)276 INFO Connection timed out when updating ... (OOPS-...)
279277
280278
281Updating all the watches on a bug tracker279Updating all the watches on a bug tracker
282280
=== modified file 'lib/lp/bugs/scripts/checkwatches/base.py'
--- lib/lp/bugs/scripts/checkwatches/base.py 2010-10-26 15:47:24 +0000
+++ lib/lp/bugs/scripts/checkwatches/base.py 2010-11-08 18:38:54 +0000
@@ -222,7 +222,7 @@
222 oops_info = report_oops(222 oops_info = report_oops(
223 message, properties, info, self._transaction_manager)223 message, properties, info, self._transaction_manager)
224 # Also put it in the log.224 # Also put it in the log.
225 self.logger.error("%s (%s)" % (message, oops_info.oopsid))225 self.logger.info("%s (%s)" % (message, oops_info.oopsid))
226 # Reset statement logging, if enabled.226 # Reset statement logging, if enabled.
227 self._statement_logging_reset()227 self._statement_logging_reset()
228 # Return the OOPS ID so that we can use it in228 # Return the OOPS ID so that we can use it in