Skip to content

feat: Add sanitized parse-error reports for log aggregation (closes #1)#24

Open
royliz3090-jpg wants to merge 2 commits into
9904099:mainfrom
royliz3090-jpg:parse-error-report
Open

feat: Add sanitized parse-error reports for log aggregation (closes #1)#24
royliz3090-jpg wants to merge 2 commits into
9904099:mainfrom
royliz3090-jpg:parse-error-report

Conversation

@royliz3090-jpg

Copy link
Copy Markdown

Parse Error Reporting for Log Aggregation

This PR adds a --parse-error-report PATH CLI option that writes a JSON summary of parse failures.

Changes:

  • Added ParseErrorReporter class for collecting parse errors
  • Added _sanitize_error_message() to remove secrets and sensitive data
  • Added _parse_json_line() and _parse_plaintext_line() with error reporting
  • Added comprehensive tests

Acceptance Criteria:

  • --parse-error-report PATH writes JSON summary
  • Records parser type, file path, line number, sanitized error
  • No raw log lines or secrets in report
  • Existing outputs backward compatible
  • Tests for valid/malformed logs

Test Results:

✓ Sanitize test passed
✓ JSON parse test passed
✓ Report generation test passed
All tests passed!

Usage:

python3 tools/log_aggregator.py --input logs/*.log --parse-error-report errors.json

Closes #1


Bounty: $40
Lightning Address: fullphone56@walletofsatoshi.com

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.

[$40 BOUNTY] [Python] Add sanitized parse-error reports for log aggregation

1 participant