Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Command verbosity. #49

Closed
wants to merge 2 commits into from
Closed

✨ Command verbosity. #49

wants to merge 2 commits into from

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Dec 7, 2023

Add command reporting verbosity. This is intended to better support troubleshooting.
Mainly, the support for level=LiveOutput. This streams command output to the task activity log.
Output may be filtered at 2 points:

  • When the bytes are collected. Example: format output with terminal control characters (no \n).
  • When the lines are reported. Filter in/out to reduce noise. Example: verbose output designed to convey progress can be interpreted and reported as progress rather than spamming the log.

The output reporting is rate-limited using a backoff algorithm.

Add command New constructor and update the repository package to use it.

@jortel jortel marked this pull request as ready for review December 7, 2023 19:35
@jortel jortel requested a review from mansam December 7, 2023 19:35
@jortel jortel force-pushed the command-debug branch 4 times, most recently from 6e2c97a to fdbbda8 Compare December 11, 2023 18:04
command/cmd.go Outdated
@@ -64,41 +83,30 @@ func (r *Command) RunWith(ctx context.Context) (err error) {
// On error: The command (without arguments) and output are
// reported in task Report.Activity
func (r *Command) RunSilent() (err error) {
err = r.RunSilentWith(context.TODO())
r.Reporter.Verbosity = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be -1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Signed-off-by: Jeff Ortel <[email protected]>
@jortel
Copy link
Contributor Author

jortel commented Dec 13, 2023

Replaced by better solution in #50

@jortel jortel closed this Dec 13, 2023
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.

2 participants