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

[tor-commits] [oonib/master] Include backend version in logfile and report



commit aeccb1f4a8399a4d9f8444dd55535382b5e069ef
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Thu Jun 6 16:43:05 2013 +0200

    Include backend version in logfile and report
    
    Bump version in __init__ to 0.9
---
 oonib/__init__.py              |    2 +-
 oonib/log.py                   |    1 +
 oonib/report/file_collector.py |    4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/oonib/__init__.py b/oonib/__init__.py
index 8ddad00..a612c5a 100644
--- a/oonib/__init__.py
+++ b/oonib/__init__.py
@@ -16,7 +16,7 @@ from storm.databases.sqlite import SQLite
 import string
 import random
 
-__version__ = '0.0.1'
+__version__ = '0.9'
 
 class Storage(dict):
     """
diff --git a/oonib/log.py b/oonib/log.py
index 14b203d..6a35ecf 100644
--- a/oonib/log.py
+++ b/oonib/log.py
@@ -46,6 +46,7 @@ def start(logfile=None, application_name="oonib"):
     txlog.msg("Starting %s on %s (%s UTC)" % (application_name,
                                               otime.prettyDateNow(),
                                               otime.utcPrettyDateNow()))
+    txlog.msg("oonib version %s" % config.backend_version)
     txlog.startLoggingWithObserver(LogWithNoPrefix(sys.stdout).emit)
     txlog.addObserver(txlog.FileLogObserver(daily_logfile).emit)
 
diff --git a/oonib/report/file_collector.py b/oonib/report/file_collector.py
index 8c43657..2f7ac48 100644
--- a/oonib/report/file_collector.py
+++ b/oonib/report/file_collector.py
@@ -132,6 +132,7 @@ class NewReportHandlerFile(web.RequestHandler):
         test_version = report_data['test_version']
         probe_asn = report_data['probe_asn']
         content = report_data['content']
+        content['backend_version'] = config.backend_version
 
         if not probe_asn:
             probe_asn = "AS0"
@@ -148,8 +149,7 @@ class NewReportHandlerFile(web.RequestHandler):
                 'report_id': report_id
         }
 
-        self.writeToReport(report_filename,
-                report_data['content'])
+        self.writeToReport(report_filename, content)
 
         self.write(response)
 



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