]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
add more logging
authorBrian Warner <warner@lothar.com>
Sun, 3 Dec 2006 07:53:53 +0000 (00:53 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 3 Dec 2006 07:53:53 +0000 (00:53 -0700)
allmydata/queen.py
allmydata/upload.py

index 2f50c300acf9b318f7b64c2dce8623af0e6ca942..f8720412441812def80e7a8e86047250ecbaec2a 100644 (file)
@@ -20,17 +20,19 @@ class Roster(service.MultiService, Referenceable):
     def remote_hello(self, nodeid, node, pburl):
         log.msg("roster: contact from %s" % idlib.b2a(nodeid))
         eventually(self._educate_the_new_peer,
-                   node, list(self.phonebook.items()))
+                   nodeid, node, list(self.phonebook.items()))
         eventually(self._announce_new_peer,
                    nodeid, pburl, list(self.connections.values()))
         self.phonebook[nodeid] = pburl
         self.connections[nodeid] = node
         node.notifyOnDisconnect(self._lost_node, nodeid)
 
-    def _educate_the_new_peer(self, node, new_peers):
+    def _educate_the_new_peer(self, nodeid, node, new_peers):
+        log.msg("roster: educating %s (%d)" % (idlib.b2a(nodeid)[:4], len(new_peers)))
         node.callRemote("add_peers", new_peers=new_peers)
 
     def _announce_new_peer(self, new_nodeid, new_node_pburl, peers):
+        log.msg("roster: announcing %s to everybody (%d)" % (idlib.b2a(new_nodeid)[:4], len(peers)))
         for targetnode in peers:
             targetnode.callRemote("add_peers",
                                   new_peers=[(new_nodeid, new_node_pburl)])
index 4c932d0c78c0e74b38786d1e01f02fd844ad0cc8..222c89988a21f5397a32648e88ea06645eb315aa 100644 (file)
@@ -1,5 +1,5 @@
 
-from twisted.python import failure
+from twisted.python import failure, log
 from twisted.internet import defer
 from twisted.application import service
 
@@ -43,6 +43,7 @@ class FileUploader:
 
 
     def start(self):
+        log.msg("starting upload")
         if self.debug:
             print "starting upload"
         # first step: who should we upload to?