From c132c176615671d5d67b7fc54864f45293035ffd Mon Sep 17 00:00:00 2001 From: Thor77 Date: Tue, 21 Jun 2016 18:20:57 +0200 Subject: [PATCH] add ident_map-arg to tsstats.log.parse_logs * give all given arguments to tsstats.log._bundle_logs while parsing (*args, **kwargs) --- tsstats/log.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tsstats/log.py b/tsstats/log.py index 7e08902..e24c3a5 100644 --- a/tsstats/log.py +++ b/tsstats/log.py @@ -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