Jean-Tiare Le Bigot committed b9e5e7e

enhanced log messages

  • Participants
  • Parent commits 124406b

Comments (0)

Files changed (1)


         if hash_key_type is autoincrement_int:
+        dblog.debug("Created table %s(%s, %s)", cls.__table__, hash_key_name, range_key_name)
         return table
     def get_table(self, name):
-        dblog.debug("[GET] %s(%s, %s)", cls.__table__, h_value, r_value)
+        dblog.debug("Got item (%s, %s) from table %s", h_value, r_value, cls.__table__)
         return cls.from_dict(item)
         res = batch_list.submit()
-        dblog.debug("[BATCH GET] %s", cls.__table__)
+        dblog.debug("Sent a batch get on table %s", cls.__table__)
         return [
             cls.from_dict(d) for d in res[u"Responses"][cls.__table__][u"Items"]
                 scan_index_forward=not reverse)
-        dblog.debug("[QUERY] %s(%s, %s)", cls.__table__, h_value, range_key_condition)
+        dblog.debug("Queried (%s, %s) on table", h_value, range_key_condition, cls.__table__)
         return (cls.from_dict(d) for d in res)
         res = table.scan(scan_filter)
-        dblog.debug("[QUERY] %s(%s)", cls.__table__, scan_filter)
+        dblog.debug("Scanned table %s with filter %s", cls.__table__, scan_filter)
         return (
         hash_key_value = getattr(self, hash_key)
         range_key_value = getattr(self, hash_key, None)
-        dblog.debug("[SAVE] %s(%s, %s) allow_overwrite=%s", cls.__table__, hash_key_value, range_key_value, allow_overwrite)
+        dblog.debug("Saved (%s, %s) in table %s allow_overwrite=%s", hash_key_value, range_key_value, cls.__table__, allow_overwrite)
     def delete(self):
         """Delete the current object from the database."""
         table = ConnectionBorg().get_table(cls.__table__)
         Item(table, hash_key_value, range_key_value).delete()
-        dblog.debug("[DELETE] %s(%s, %s)", cls.__table__, hash_key_value, range_key_value)
+        dblog.debug("Deleted (%s, %s) from table %s", hash_key_value, range_key_value, cls.__table__)