[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Make debug messages a bit more useful



commit c1ae6afc95e8fdc23b6ce3d75a117a902be543d2
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Tue Nov 27 15:15:40 2012 +0100

    Make debug messages a bit more useful
---
 ooni/oonicli.py         |    2 --
 ooni/runner.py          |    4 +++-
 ooni/templates/httpt.py |    3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ooni/oonicli.py b/ooni/oonicli.py
index f706ee3..ca80ad7 100644
--- a/ooni/oonicli.py
+++ b/ooni/oonicli.py
@@ -166,8 +166,6 @@ def run():
             cmd_line_options = test['options']
             if resume:
                 cmd_line_options['resume'] = True
-            else:
-                cmd_line_options['resume'] = False
             test_list.append(runner.loadTest(cmd_line_options))
     else:
         log.msg("No test deck detected")
diff --git a/ooni/runner.py b/ooni/runner.py
index d5cc5fb..97d4d7e 100644
--- a/ooni/runner.py
+++ b/ooni/runner.py
@@ -412,15 +412,17 @@ def runTestCases(test_cases, options, cmd_line_options):
     test_filename = os.path.basename(cmd_line_options['test'])
 
     if cmd_line_options['resume']:
+        log.debug("Resuming %s" % test_filename)
         resumeTest(test_filename, input_unit_factory)
     else:
+        log.debug("Nothing to resume for %s" % test_filename)
         config.stateDict[test_filename] = 0
 
     updateProgressMeters(test_filename, input_unit_factory, len(test_cases))
 
     try:
         for input_unit in input_unit_factory:
-            log.debug("Running this input unit %s" % input_unit)
+            log.debug("Running %s with input unit %s" % (test_filename, input_unit))
 
             yield runTestCasesWithInputUnit(test_cases, input_unit,
                         oreporter)
diff --git a/ooni/templates/httpt.py b/ooni/templates/httpt.py
index e3c8efe..dcd8ff9 100644
--- a/ooni/templates/httpt.py
+++ b/ooni/templates/httpt.py
@@ -215,7 +215,6 @@ class HTTPTest(NetTestCase):
                 dict containing the response headers. This will lead
                 self.headerProcessor to not be called.
 
-
             body_processor (func): a function to be called with as argument the
                 body of the response. This will lead self.bodyProcessor to not
                 be called.
@@ -281,7 +280,7 @@ class HTTPTest(NetTestCase):
         # We prefix the URL with 's' to make the connection go over the
         # configured socks proxy
         if use_tor:
-            log.debug("Using control agent for the request")
+            log.debug("Using Tor for the request to %s" % url)
             url = 's'+url
             agent = self.control_agent
         else:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits