From: Michael Tremer Date: Mon, 3 Nov 2008 21:22:22 +0000 (+0100) Subject: Added access log to load balancer. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e299f1d6126f186bb6681e99281f1edf32d4867;p=ipfire.org.git Added access log to load balancer. --- diff --git a/download/getfile.py b/download/getfile.py index b2ca448b..eb57b56d 100644 --- a/download/getfile.py +++ b/download/getfile.py @@ -8,6 +8,7 @@ import cgi from mimetypes import guess_type debug = open("debug.log", "a") #None +access = open("access.log", "a") hosts = ( # PRIO SCHEME HOSTNAME PATH @@ -125,12 +126,14 @@ while servers.all(): print "Pragma: no-cache" print + access.write("%s\n" % url) if debug: debug.write("OK %s\n" % url) break else: if os.access(file, os.R_OK): + access.write("%s\n" % url) servefile(file) else: print "Status: 404 Not Found" @@ -140,5 +143,6 @@ else: if debug: debug.write("ERR %s wasn't found on any server" % file) +access.close() if debug: debug.close()