Deryck Hodge has proposed merging 
lp:~deryck/launchpad/fix-checkwatches-logging-661441 into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #661441 Duplicate oops reports logged for each checkwatches oops
  https://bugs.launchpad.net/bugs/661441


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.
-- 
https://code.launchpad.net/~deryck/launchpad/fix-checkwatches-logging-661441/+merge/40367
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~deryck/launchpad/fix-checkwatches-logging-661441 into lp:launchpad/devel.
=== 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 @@
     ...         bug_tracker_names=[example_bug_tracker_name])
     ... finally:
     ...     urllib2.urlopen = urlopen
-    ERROR...Connection timed out when updating ... (OOPS-...)
-
     >>> dump_last_oops()
     Oops-Id: OOPS-...TCW...
     Exception-Type: timeout
@@ -275,7 +273,7 @@
     ...     urllib2.urlopen = urlopen
     DEBUG No global batch size specified.
     INFO Updating 5 watches for 5 bugs on http://bugs.example.com
-    ERROR Connection timed out when updating ... (OOPS-...)
+    INFO Connection timed out when updating ... (OOPS-...)
 
 
 Updating all the watches on a bug tracker

=== 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 @@
         oops_info = report_oops(
             message, properties, info, self._transaction_manager)
         # Also put it in the log.
-        self.logger.error("%s (%s)" % (message, oops_info.oopsid))
+        self.logger.info("%s (%s)" % (message, oops_info.oopsid))
         # Reset statement logging, if enabled.
         self._statement_logging_reset()
         # Return the OOPS ID so that we can use it in

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to