Skip to content

feat(scan): structured logging for scans (URL, duration, violations, error class) - #130

Open
DevOlabode wants to merge 1 commit into
mainfrom
feat/structured-scan-logging
Open

DevOlabode wants to merge 1 commit into
mainfrom
feat/structured-scan-logging

Conversation

@DevOlabode

@DevOlabode DevOlabode commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Closes #126.

ScanRunner.run() now emits one JSON line per scan ("event":"scan"): console.log on success, console.error on failure.

  • ok: url, durationMs, violations (count per bucket), totalViolations
  • error: url, durationMs, errorClass, error. Covers SSRF rejection, browser launch failure (previously unlogged), and page/axe errors.

Return/throw behaviour is unchanged. Adds a test in backend/tests/scanRunner.test.js; all 130 backend tests pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add structured logging for scans (URL, duration, violation count, error class)

1 participant