]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
logtool: rename get-logs.py to logtool.py
authorBrian Warner <warner@lothar.com>
Mon, 19 Nov 2007 01:30:55 +0000 (18:30 -0700)
committerBrian Warner <warner@lothar.com>
Mon, 19 Nov 2007 01:30:55 +0000 (18:30 -0700)
misc/get-logs.py [deleted file]
misc/logtool.py [new file with mode: 0644]

diff --git a/misc/get-logs.py b/misc/get-logs.py
deleted file mode 100644 (file)
index 4471d4a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /usr/bin/python
-
-import sys
-import foolscap
-from foolscap.schema import DictOf, Any
-from twisted.internet import reactor
-from zope.interface import implements
-from twisted.python import log
-#log.startLogging(sys.stderr)
-
-
-class RILogObserver(foolscap.RemoteInterface):
-    def msg(logmsg=DictOf(str, Any())):
-        return None
-
-class LogFetcher(foolscap.Referenceable):
-    implements(RILogObserver)
-    def start(self, target_furl):
-        print "Connecting.."
-        self._tub = foolscap.Tub()
-        self._tub.startService()
-        d = self._tub.getReference(target_furl)
-        d.addCallback(self._got_logpublisher)
-        d.addErrback(self._error)
-
-    def _error(self, f):
-        print "ERROR", f
-        reactor.stop()
-
-    def _got_logpublisher(self, publisher):
-        print "Connected"
-        d = publisher.callRemote("subscribe_to_all", self)
-        d.addErrback(self._error)
-
-    def remote_msg(self, d):
-        print d
-
-
-target_furl = sys.argv[1]
-lf = LogFetcher()
-lf.start(target_furl)
-#print "starting.."
-reactor.run()
diff --git a/misc/logtool.py b/misc/logtool.py
new file mode 100644 (file)
index 0000000..4471d4a
--- /dev/null
@@ -0,0 +1,43 @@
+#! /usr/bin/python
+
+import sys
+import foolscap
+from foolscap.schema import DictOf, Any
+from twisted.internet import reactor
+from zope.interface import implements
+from twisted.python import log
+#log.startLogging(sys.stderr)
+
+
+class RILogObserver(foolscap.RemoteInterface):
+    def msg(logmsg=DictOf(str, Any())):
+        return None
+
+class LogFetcher(foolscap.Referenceable):
+    implements(RILogObserver)
+    def start(self, target_furl):
+        print "Connecting.."
+        self._tub = foolscap.Tub()
+        self._tub.startService()
+        d = self._tub.getReference(target_furl)
+        d.addCallback(self._got_logpublisher)
+        d.addErrback(self._error)
+
+    def _error(self, f):
+        print "ERROR", f
+        reactor.stop()
+
+    def _got_logpublisher(self, publisher):
+        print "Connected"
+        d = publisher.callRemote("subscribe_to_all", self)
+        d.addErrback(self._error)
+
+    def remote_msg(self, d):
+        print d
+
+
+target_furl = sys.argv[1]
+lf = LogFetcher()
+lf.start(target_furl)
+#print "starting.."
+reactor.run()