[Shtoom] patch: one way to fix logging on Mac

zooko at zooko.com zooko at zooko.com
Mon Oct 4 21:29:30 CEST 2004


For reasons entirely obscure to me, this fixes logging on Mac.  Perhaps this
shows that there is a bug in Twisted logging?


HACK pion:~/playground/shtoom/darcsworld$ darcs diff -u --patch="setStdout"
Mon Oct  4 16:26:44 ADT 2004  zooko at zooko.com
  * remove setStdout=False

diff -rN -u darcsworld-old/Shtoom/shtoom/shtoom/app/phone.py darcsworld-new/Shtoom/shtoom/shtoom/app/phone.py
--- darcsworld-old/Shtoom/shtoom/shtoom/app/phone.py    2004-10-04 16:28:40.000000000 -0300
+++ darcsworld-new/Shtoom/shtoom/shtoom/app/phone.py    2004-10-04 16:26:21.000000000 -0300
@@ -51,7 +51,7 @@
         l = self.getPref('logfile')
         if l:
             open("shtoom.meta.log", "aU").write("about to log.startLogging(open(%s, 'aU'), setStdout=False)\n" % l)
-            log.startLogging(open(l, 'aU'), setStdout=False)
+            log.startLogging(open(l, 'aU'))
         BaseApplication.boot(self)

     def register(self):
diff -rN -u darcsworld-old/Shtoom/shtoom/shtoom/ui/textshtoom.py darcsworld-new/Shtoom/shtoom/shtoom/ui/textshtoom.py
--- darcsworld-old/Shtoom/shtoom/shtoom/ui/textshtoom.py        2004-10-04 16:28:40.000000000 -0300
+++ darcsworld-new/Shtoom/shtoom/shtoom/ui/textshtoom.py        2004-10-04 16:24:57.000000000 -0300
@@ -21,6 +21,6 @@
     stdio.StandardIO(UI)
     if not app.getPref('logfile'):
         open("shtoom.meta.log", "aU").write("about to log.startLogging(sys.stdout, setStdout=False)\n")
-        log.startLogging(sys.stdout, setStdout=False)
+        log.startLogging(sys.stdout)
     return UI






More information about the Shtoom mailing list