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 SSH commands #175

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

qrichert
Copy link
Contributor

@qrichert qrichert commented Jan 9, 2025

@NobodyXu

As per #174.

This PR adds logging for the actual SSH commands through the tracing crate.
The result looks like this:

Regular:

2025-01-08T19:09:46.223524Z DEBUG openssh::process_impl::command: 54: cmd="ssh" "-S" "/Users/Quentin/.local/state/.ssh-connectionguuxlv/master" "-o" "BatchMode=yes" "-T" "-p" "9" "none" "--" "ls" "-rtl"

Multiplex:

2025-01-08T19:08:44.459856Z DEBUG openssh::native_mux_impl::command: 77: cmd="ls -rtl"

Closes #174

@jonhoo
Copy link
Collaborator

jonhoo commented Jan 9, 2025

This change is Reviewable

Copy link
Member

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Thank you!

@NobodyXu NobodyXu merged commit bc8f743 into openssh-rust:master Jan 9, 2025
12 checks passed
@github-actions github-actions bot mentioned this pull request Jan 9, 2025
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.61%. Comparing base (bacc76d) to head (9286fa8).
Report is 23 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
Files with missing lines Coverage Δ
src/native_mux_impl/command.rs 100.00% <100.00%> (+1.69%) ⬆️
src/process_impl/command.rs 100.00% <100.00%> (+2.32%) ⬆️

... and 13 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Log SSH commands
4 participants