]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
node: provoke foolscap-0.2.2 into saving logport.furl, so we can attach to it with...
authorBrian Warner <warner@allmydata.com>
Wed, 19 Dec 2007 06:27:02 +0000 (23:27 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 19 Dec 2007 06:27:02 +0000 (23:27 -0700)
src/allmydata/node.py

index 29e5b24ae88cb615f671b698251d2450986c3512..712662eee62eb336ab3d48570106e4162f7cdd2b 100644 (file)
@@ -204,9 +204,13 @@ class Node(service.MultiService):
         # TODO: twisted >2.5.0 offers maxRotatedFiles=50
 
         self.tub.setOption("logport-furlfile",
-                           os.path.join(self.basedir, "logport.furl"))
+                           os.path.join(self.basedir, "private","logport.furl"))
         self.tub.setOption("log-gatherer-furlfile",
                            os.path.join(self.basedir, "log_gatherer.furl"))
+        # provoke foolscap into registering the logport when it can, so that
+        # the 'logport.furl' file will be available for people to use
+        # 'flogtool tail'.
+        self.when_tub_ready().addCallback(lambda res: self.tub.getLogPortFURL())
 
     def log(self, msg, src="", args=(), **kw):
         if src: