mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Improved some logging levels for stats
This commit is contained in:
parent
bb16e37a24
commit
5cd47137dd
1 changed files with 2 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ def main():
|
||||||
destsize = ftp.stat(f).st_size
|
destsize = ftp.stat(f).st_size
|
||||||
if (not os.path.exists(destpath) or
|
if (not os.path.exists(destpath) or
|
||||||
os.path.getsize(destpath) != destsize):
|
os.path.getsize(destpath) != destsize):
|
||||||
logging.info("...retrieving " + f)
|
logging.debug("...retrieving " + f)
|
||||||
ftp.get(f, destpath)
|
ftp.get(f, destpath)
|
||||||
except Exception:
|
except Exception:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
@ -122,7 +122,7 @@ def main():
|
||||||
logexpr = '(?P<ip>[.:0-9a-fA-F]+) - - \[(?P<time>.*?)\] "GET (?P<uri>.*?) HTTP/1.\d" (?P<statuscode>\d+) \d+ "(?P<referral>.*?)" "(?P<useragent>.*?)"'
|
logexpr = '(?P<ip>[.:0-9a-fA-F]+) - - \[(?P<time>.*?)\] "GET (?P<uri>.*?) HTTP/1.\d" (?P<statuscode>\d+) \d+ "(?P<referral>.*?)" "(?P<useragent>.*?)"'
|
||||||
logsearch = re.compile(logexpr).search
|
logsearch = re.compile(logexpr).search
|
||||||
for logfile in glob.glob(os.path.join(logsdir,'access-*.log.gz')):
|
for logfile in glob.glob(os.path.join(logsdir,'access-*.log.gz')):
|
||||||
logging.info('...' + logfile)
|
logging.debug('...' + logfile)
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print '...' + logfile
|
print '...' + logfile
|
||||||
p = subprocess.Popen(["zcat", logfile], stdout = subprocess.PIPE)
|
p = subprocess.Popen(["zcat", logfile], stdout = subprocess.PIPE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue