Update report_generator.py

This commit is contained in:
SpudGunMan
2024-10-04 01:15:45 -07:00
parent 195e6327e0
commit 24e93e3bd5
+3 -1
View File
@@ -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