From: Brian Warner Date: Sun, 3 Dec 2006 07:53:53 +0000 (-0700) Subject: add more logging X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~482 X-Git-Url: https://git.rkrishnan.org/pf/content/%22news.html/-?a=commitdiff_plain;h=eedef54a72bc09b7c91f63cff42b9c2e887b5fe6;p=tahoe-lafs%2Ftahoe-lafs.git add more logging --- diff --git a/allmydata/queen.py b/allmydata/queen.py index 2f50c300..f8720412 100644 --- a/allmydata/queen.py +++ b/allmydata/queen.py @@ -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)]) diff --git a/allmydata/upload.py b/allmydata/upload.py index 4c932d0c..222c8998 100644 --- a/allmydata/upload.py +++ b/allmydata/upload.py @@ -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?