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

feat: Log stdout/err of cmdgit executions as Trace level #538

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

tiesmaster
Copy link
Contributor

What does this change

As discussed in #537, this adds the git standard output, and error streams in the trace log level, in order to troubleshoot git push failures (or other kind of git failures, that would be missed as not having this in trace level).

What issue does it fix

Closes #537

Notes for the reviewer

  • I'm also including the git "cmd line", so it's clear what the output belongs to
    • You'd mostly know that, as the output will be very familiar, but it makes sense to me to clarify this, if we're going to clarify this
  • As we're logging 3 distinct things (the cmd line, stdout, and stderr), I thought it would make sense to add that via structured logging that's available (the withFields), to make the log more readable, and possible to filter more easily there, if needed.

Checklist

  • Made sure the PR follows the CONTRIBUTING.md guidelines
  • Tests if something new is added
    • I haven't added any additional tests, as this is a very small contribution, and I haven't found logging to be covered with tests. If this is desired, I can add tests

@tiesmaster
Copy link
Contributor Author

@lindell Both good suggestions, I've accepted them. Please have another look, when you have the time.

Copy link
Owner

@lindell lindell left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the contribution!

@lindell lindell merged commit 771c8fd into lindell:master Feb 28, 2025
9 checks passed
Copy link
Contributor

Included in release v0.56.0 🎉

@tiesmaster tiesmaster deleted the issue537/log-git-stdout-and-error branch February 28, 2025 13:41
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.

Feature request: Output git stdout/err in trace log level
2 participants