test run logs

This commit is contained in:
Adam Wilson
2025-07-19 15:19:28 -06:00
parent 296669ac49
commit 91afa1e7e4
41 changed files with 1760 additions and 8 deletions
@@ -11,9 +11,12 @@ from src.text_generation.services.logging.abstract_web_traffic_logging_service i
class JSONWebTrafficLoggingService(AbstractWebTrafficLoggingService):
def __init__(self):
vulnerability_test_category = os.getenv('GARAK_PROBE')
if not vulnerability_test_category:
raise ValueError('Unable to determine test category')
self._lock = threading.Lock()
timestamp = calendar.timegm(time.gmtime())
self.log_file_path = f"http_logs_{timestamp}.json"
self.log_file_path = f"http_logs_{timestamp}__{vulnerability_test_category}.json"
self._ensure_log_file_exists()
def _ensure_log_file_exists(self):