londiste.handlers.dispatch: mention table name in mismatch warnings
authorMarko Kreen <markokr@gmail.com>
Thu, 24 Nov 2011 15:40:57 +0000 (17:40 +0200)
committerMarko Kreen <markokr@gmail.com>
Thu, 24 Nov 2011 15:40:57 +0000 (17:40 +0200)
python/londiste/handlers/dispatch.py

index b9c3e3fb7bd0d6c8e8627b16e93ea222eb488c21..dba1afe872ecc2fd3999b05be07b4c76a84e347b 100644 (file)
@@ -401,8 +401,8 @@ class BulkLoader(BaseBulkTempLoader):
         self.delete(curs)
         # check if right amount of rows deleted (only in direct mode)
         if self.conf.table_mode == 'direct' and cnt != curs.rowcount:
-            self.log.warning("Delete mismatch: expected=%s deleted=%d"
-                    % (cnt, curs.rowcount))
+            self.log.warning("%s: Delete mismatch: expected=%s deleted=%d"
+                    % (self.table, cnt, curs.rowcount))
 
     def process_update(self, curs, op_map):
         """Process update list"""
@@ -423,15 +423,15 @@ class BulkLoader(BaseBulkTempLoader):
             self.update(curs)
             # check count (only in direct mode)
             if self.conf.table_mode == 'direct' and cnt != curs.rowcount:
-                self.log.warning("Update mismatch: expected=%s updated=%d"
-                        % (cnt, curs.rowcount))
+                self.log.warning("%s: Update mismatch: expected=%s updated=%d"
+                        % (self.table, cnt, curs.rowcount))
         else:
             # delete from main table using temp
             self.delete(curs)
             # check count (only in direct mode)
             if self.conf.table_mode == 'direct' and real_cnt != curs.rowcount:
-                self.log.warning("bulk: Update mismatch: expected=%s deleted=%d"
-                        % (real_cnt, curs.rowcount))
+                self.log.warning("%s: Update mismatch: expected=%s deleted=%d"
+                        % (self.table, real_cnt, curs.rowcount))
             # insert into main table
             if AVOID_BIZGRES_BUG:
                 # copy again, into main table