diff --git a/tsstats/__main__.py b/tsstats/__main__.py index 984dfd3..e28d626 100644 --- a/tsstats/__main__.py +++ b/tsstats/__main__.py @@ -64,8 +64,13 @@ def main(config=None, idmap=None, log=None, output=None, debug=False): if not log or not output: raise InvalidConfiguration('log or output missing') - clients = parse_logs(log, ident_map=identmap) - render_template(clients, output=abspath(output)) + sid_clients = parse_logs(log, ident_map=identmap) + for sid, clients in sid_clients.items(): + if sid: + ext = '.{}'.format(sid) + else: + ext = '' + render_template(clients, output=abspath(output + ext)) if __name__ == '__main__':