-
Notifications
You must be signed in to change notification settings - Fork 12
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
Log when pinging #81
Log when pinging #81
Conversation
src/registry/artifactory.rs
Outdated
@@ -75,6 +75,11 @@ impl Artifactory { | |||
}; | |||
|
|||
let status = response.status(); | |||
|
|||
if !status.is_success() { | |||
tracing::info!(response_header=?response.headers()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use debug we may need to override RUST_LOG env var in CI - hopefully this should be possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to consider the debug string too:
tracing::info!(response_header=?response.headers()); | |
tracing::debug!("artifactory response: {:?}", response); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You have an example here:
buffrs/.github/workflows/ci.yml
Line 34 in 3120b1a
RUST_BACKTRACE: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're trying to fix a bug that only appears in CI, and I'm not sure how to override RUST_LOG there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding debug!
, I don't see my debug logs when I run this. I seem to remember a lot of custom initialization being done to tracing_subscriber:
RUST_LOG=debug cargo run -- login --registry https://my-registry...
export RUST_LOG=debug; cargo run -- login --registry https://my-registry...
(This doesn't change with RUST_BACKTRACE=1
)
Closing because another merge breaks this PR pretty badly. |
This helps us determine if the token is correct.