feat(miner): Add JSON output mode to clawrtc mine#352
Open
Tianlin0725 wants to merge 1 commit intoScottcjn:mainfrom
Open
feat(miner): Add JSON output mode to clawrtc mine#352Tianlin0725 wants to merge 1 commit intoScottcjn:mainfrom
Tianlin0725 wants to merge 1 commit intoScottcjn:mainfrom
Conversation
Add --json flag to enable structured JSON output (JSONL format) instead of human-readable text. This enables integration with monitoring dashboards, automated alerting, and data analysis tools. Changes: - Add --json and --dry-run flags to argparse - Create emit() helper method that outputs either JSON or human text - Update attestation and mining loop to use emit() instead of print() Closes Scottcjn#346
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
--jsonflag to the universal miner that makes the miner output structured JSON instead of human-readable text. This lets other tools and scripts parse miner output programmatically.Changes
--jsonand--dry-runflags to argparseemit()helper method that outputs either JSON (JSONL format) or human-readable text based onjson_modeflagemit()instead ofprint()Expected Behavior
Related Issue
Closes #346 (GOOD FIRST ISSUE)