-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow debug logs to work with clap tests themselves #1851
Conversation
Oops. Looks like specifying deps based on some
So, they will always be included. But they won't actually be used anywhere when Related to rust-lang/cargo#5777 |
78a31ff
to
1446b98
Compare
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.
To be honest, I am a bit unhappy with this PR. More specifically:
-
clap
is a library, not the binary. Libraries are not supposed to initialize the logger:From
log
crate' doc:Libraries should link only to the log crate, and use the provided macros to log whatever information will be useful to downstream consumers.
We may use it as internal-only hack, but we would need to put it behind a cfg (and test with
RUSTFLAGS='--cfg clap_debug' cargo run ...
). -
Output format: please don't strip struct' name from output. It really helps me to debug things, and module name is not always enough. Also, can we insert a tab between
[...]
and the message so the message appears aligned? Logs can be lengthy and it's not particularly easy to scan though it when it's unaligned.
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.
Great! Just a small nitpick
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.
bors r+
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
bors r=CreepySkeleton |
Build succeeded:
|
No description provided.