From bd87111e08709e825af2abad0d94894274a354c6 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 28 Oct 2021 21:12:28 +0000 Subject: [PATCH] fixed debug logging Signed-off-by: Arthur Lu --- src/cli/superscript.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/cli/superscript.py b/src/cli/superscript.py index 7a75f09..6df57f9 100644 --- a/src/cli/superscript.py +++ b/src/cli/superscript.py @@ -308,16 +308,11 @@ def main(send, verbose = False, profile = False, debug = False): current_module.load_data() current_module.process_data(exec_threads) current_module.push_results() - print(m + " module finished in " + str(time.time() - start) + " seconds") - - if debug: - f = open("matchloop.log", "w+") - json.dump(match_results, f, ensure_ascii=False, indent=4) - f.close() - - f = open("pitloop.log", "w+") - json.dump(pit_results, f, ensure_ascii=False, indent=4) - f.close() + send(stdout, INF, m + " module finished in " + str(time.time() - start) + " seconds") + if debug: + f = open(m + ".log", "w+") + json.dump({"data": current_module.data, "results":current_module.results}, f, ensure_ascii=False, indent=4) + f.close() set_current_time(client, loop_start) close_all()