Author: poeml Date: Tue Oct 5 02:09:30 2010 New Revision: 73 URL: http://svn.mirrorbrain.org/viewvc/mod_stats?rev=73&view=rev Log: tools/dlcount.py: - pass options to gen_processreqs() so we can switch verbosity on/off Modified: trunk/tools/dlcount.py Modified: trunk/tools/dlcount.py URL: http://svn.mirrorbrain.org/viewvc/mod_stats/trunk/tools/dlcount.py?rev=73&r1=72&r2=73&view=diff ============================================================================== --- trunk/tools/dlcount.py (original) +++ trunk/tools/dlcount.py Tue Oct 5 02:09:30 2010 _at_@ -283,7 +283,7 @@ # return Countable(self.tuple) -def gen_processreqs(reqs, conf): +def gen_processreqs(reqs, conf, options): """process a tuple of request data, and return the parsed in the form of a generator""" known = RingBuffer(conf['statsdupwindow']) _at_@ -349,6 +349,8 @@ url = r.sub(s, url) matched = mreg if not matched: + if options.verbose: + print 'not matched', url yield rq continue _at_@ -368,6 +370,7 @@ rq.tuple = tuple(rq.tuple) rq.countable = True + #print rq yield rq _at_@ -414,7 +417,7 @@ logfiles = gen_open(filenames) loglines = gen_cat(logfiles) reqs = gen_fragments(loglines, conf['statslogmask'][0][0]) - items = gen_processreqs(reqs, conf) + items = gen_processreqs(reqs, conf, options) if options.db and not options.db_home: sys.exit('--db-home is mandatory with --db.') _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Tue Oct 05 2010 - 00:09:34 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT