[tor-commits] [oonib/master] Fixes a bug where logfile config option was unused.

art at torproject.org art at torproject.org
Wed Sep 11 09:13:51 UTC 2013


commit ab1fed3d3e9207ad9b48f1f3e1ae971af6e8426b
Author: aagbsn <aagbsn at extc.org>
Date:   Mon Jul 1 17:28:55 2013 +0200

    Fixes a bug where logfile config option was unused.
---
 oonib/log.py |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/oonib/log.py b/oonib/log.py
index 6a35ecf..b28b5bf 100644
--- a/oonib/log.py
+++ b/oonib/log.py
@@ -32,10 +32,12 @@ class LogWithNoPrefix(txlog.FileLogObserver):
         util.untilConcludes(self.write, "%s\n" % text)
         util.untilConcludes(self.flush)  # Hoorj!
 
-def start(logfile=None, application_name="oonib"):
+def start(application_name="oonib"):
     daily_logfile = None
 
-    if not logfile:
+    if not config.main.logfile:
+        logfile = 'oonib.log'
+    else:
         logfile = config.main.logfile
 
     log_folder = os.path.dirname(logfile)
@@ -85,8 +87,7 @@ class LoggerFactory(object):
         pass
 
     def start(self, application):
-        # XXX parametrize this
-        start('oonib.log', "OONIB")
+        start("OONIB")
 
     def stop(self):
         txlog.msg("Stopping OONIB")





More information about the tor-commits mailing list