add ident_map-arg to tsstats.log.parse_logs

* give all given arguments to tsstats.log._bundle_logs while parsing (*args,
**kwargs)
This commit is contained in:
Thor77 2016-06-21 18:20:57 +02:00
parent c0f1a6c649
commit c132c17661
1 changed files with 3 additions and 3 deletions

View File

@ -27,16 +27,16 @@ TimedLog = namedtuple('TimedLog', ['path', 'timestamp'])
logger = logging.getLogger('tsstats')
def parse_logs(log_glob):
def parse_logs(log_glob, ident_map=None, *args, **kwargs):
'''
parse logs from `log_glob`
'''
vserver_clients = {}
for virtualserver_id, logs in\
_bundle_logs(log_file for log_file in glob(log_glob)).items():
clients = Clients()
clients = Clients(ident_map)
for log in logs:
_parse_details(clients=clients)
_parse_details(clients=clients, *args, **kwargs)
if len(clients) >= 1:
vserver_clients[virtualserver_id] = clients
return vserver_clients