From eb695f1c58d97c7a1f1c2a2863cf2615720df9a3 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Tue, 12 Aug 2008 20:50:20 -0700
Subject: [PATCH] mutable/checker: log a WEIRD-level event when we see a hash
 failure, to trigger an Incident

---
 src/allmydata/mutable/checker.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/allmydata/mutable/checker.py b/src/allmydata/mutable/checker.py
index 7ea313eb..375a1fbc 100644
--- a/src/allmydata/mutable/checker.py
+++ b/src/allmydata/mutable/checker.py
@@ -3,7 +3,7 @@ from zope.interface import implements
 from twisted.internet import defer
 from twisted.python import failure
 from allmydata import hashtree
-from allmydata.util import hashutil, base32, idlib
+from allmydata.util import hashutil, base32, idlib, log
 from allmydata.interfaces import ICheckerResults
 
 from common import MODE_CHECK, CorruptShareError
@@ -196,6 +196,14 @@ class MutableChecker:
                 report.append(" %s: %s" % (s, ft))
                 p = (peerid, self._storage_index, shnum, f)
                 self.results.problems.append(p)
+                msg = ("CorruptShareError during mutable verify, "
+                       "peerid=%(peerid)s, si=%(si)s, shnum=%(shnum)d, "
+                       "where=%(where)s")
+                log.msg(format=msg, peerid=idlib.nodeid_b2a(peerid),
+                        si=base32.b2a(self._storage_index),
+                        shnum=shnum,
+                        where=ft,
+                        level=log.WEIRD)
 
         self.results.status_report = "\n".join(report) + "\n"
 
-- 
2.45.2