From 602e6c4d51106fdaf40df2d0eeeb40a8890c6225 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Wed, 23 Aug 2017 20:59:44 +0200 Subject: [PATCH] Log start/end of parsing logfile --- tsstats/log.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tsstats/log.py b/tsstats/log.py index a729f7a..af2742b 100644 --- a/tsstats/log.py +++ b/tsstats/log.py @@ -126,6 +126,7 @@ def parse_logs(log_glob, ident_map=None, online_dc=True, *args, **kwargs): clients = Clients(ident_map) for index, log in enumerate(logs): with open(log.path, encoding='utf-8') as f: + logger.debug('Started parsing of %s', f.name) # parse logfile line by line and filter lines without events events = filter(None, map(_parse_line, f)) # chain apply events to Client-obj @@ -143,6 +144,8 @@ def parse_logs(log_glob, ident_map=None, online_dc=True, *args, **kwargs): for online_client in online_clients: online_client.disconnect(pendulum.utcnow()) online_client.connected += 1 + + logger.debug('Finished parsing of %s', f.name) if len(clients) >= 1: # assemble Server-obj and yield yield Server(virtualserver_id, clients)