From 24e93e3bd56a7a718c6bd057451cf0056f7d8ab7 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Fri, 4 Oct 2024 01:15:45 -0700 Subject: [PATCH] Update report_generator.py --- etc/report_generator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/report_generator.py b/etc/report_generator.py index 719e789..f48ef9e 100644 --- a/etc/report_generator.py +++ b/etc/report_generator.py @@ -83,7 +83,9 @@ def parse_log_file(file_path): log_data['command_timestamps'].append((timestamp.isoformat(), 'LLM Query')) command = re.search(r"'cmd': '(\w+)'", line) - user = re.search(r"'user': '(\w+)'", line) + user = re.search(r"From: (\w+)", line) + if user: + user = user.group(1) if command: cmd = command.group(1) log_data['command_counts'][cmd] += 1