Enable streaming output for a block of code
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 558
- Forks
- 224
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 1
Description
Use Case
I would like to enable streaming output for specific plans without the user needing to know that passing --stream is needed for the best experience. For instance, I want a plan that can tail logs across multiple targets. The plan is completely useless unless they pass in --stream but the caller needs to know this.
Describe the Solution You Would Like
It would be nice if there was a function similar to without_default_logging that accepts a block and enables streaming output for anything that emits log output within.
with_streaming_output () || {
run_command('tail -f /var/log/messages', $target)
}
Describe Alternatives You've Considered
I've considered just asking users to pass in the flag for the best experience. Printing the message at the top or something, but I don't want to do that every time. It could also just be a documented step.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Bolt handles the --stream option and the existing without_default_logging block helper. Determine the scope and behavior needed for a block-based streaming API, with done meaning commands that emit log output inside the block stream without requiring callers to pass --stream.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100