[BOUNTY] Add JSONL output to log_aggregator.py (#3)#28
Conversation
Add export_jsonl() method that writes each parsed log entry as a self-contained JSON object on its own line, suitable for streaming ingestion and line-by-line processing. Includes --format jsonl CLI option and max_entries cap. Adds unit tests covering JSONL validity, field round-tripping, max_entries, empty export, and CLI integration. Addresses bounty mannowell#3.
|
Warning Review limit reached
More reviews will be available in 36 minutes and 25 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds JSONL (JSON Lines) output format to
tools/log_aggregator.py, addressing bounty #3. Each parsed log entry is written as a self-contained JSON object on its own line, making the output suitable for streaming ingestion and line-by-line processing.Changes
tools/log_aggregator.py:export_jsonl(output_path, max_entries=10000)method writes one JSON object per line viajson.dumps(entry, default=str).--formatCLI option now acceptsjsonlin addition tojson/csv/html.main()dispatches--format jsonltoexport_jsonl.tests/test_log_aggregator_jsonl.py: 6 unit tests covering JSONL validity (each line independently parseable), field round-tripping,max_entriescap, empty aggregator export, and CLI--format jsonlacceptance.diagnostic/build-4c507ba1.logd+.json: required diagnostic bundle.Testing
python3 tests/test_log_aggregator_jsonl.py -v-> 6 tests pass.python3 tests/test_log_aggregator_parsers.py-> 33 existing parser tests still pass (no regressions).python3 build.py-> diagnostic bundle generated and committed (diagnostic/build-4c507ba1.logd, 14906 bytes,DIAGmagic).Checklist
Addresses bounty issue #3. Please let me know the process for claiming the $25 bounty once merged.