[or-cvs] r21633: {projects} Towards better gettor statistics: Rotate log files daily (in projects/gettor: . lib/gettor)
Christian Fromme
kaner at strace.org
Sat Feb 13 19:09:01 UTC 2010
Author: kaner
Date: 2010-02-13 19:09:00 +0000 (Sat, 13 Feb 2010)
New Revision: 21633
Modified:
projects/gettor/TODO
projects/gettor/lib/gettor/gtlog.py
Log:
Towards better gettor statistics: Rotate log files daily
Modified: projects/gettor/TODO
===================================================================
--- projects/gettor/TODO 2010-02-13 02:53:35 UTC (rev 21632)
+++ projects/gettor/TODO 2010-02-13 19:09:00 UTC (rev 21633)
@@ -1,12 +1,10 @@
These are planned changes to the gettor system.
-- Split constants.py text into smaller strings, also update the text to reflect
- split-file download instructions
+- Clean distdir and packdir on each fetching/packaging run
- Split (at least) tiger bundle into several smaller archives to avoid ~20MB
- React in some way if the user requested a split download but no split
downloads are available for that specific package (maybe send out the non-
split version of the package?)
-- Clean distdir and packdir on each fetching/packaging run
- Update https://www.torproject.org/gettor/
- Write instructions on the website on how to use GetTor. Put that site into
pootle for translation so for example chinese and iranian users have a
Modified: projects/gettor/lib/gettor/gtlog.py
===================================================================
--- projects/gettor/lib/gettor/gtlog.py 2010-02-13 02:53:35 UTC (rev 21632)
+++ projects/gettor/lib/gettor/gtlog.py 2010-02-13 19:09:00 UTC (rev 21633)
@@ -18,7 +18,7 @@
import os
import sys
-from time import gmtime, strftime
+from time import strftime
import ConfigParser
import syslog
import logging
@@ -51,6 +51,9 @@
elif logSubSystem == "file":
# Silently fail if things are misconfigured
logFile = conf.getLogFile()
+ # Rotate logfile daily
+ logFile += "-"
+ logFile += strftime("%Y-%m-%d")
try:
logDir = os.path.dirname(logFile)
if not os.access(logDir, os.W_OK):
More information about the tor-commits
mailing list