-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Consider enabling debug logging by default for contributors #76608
Copy link
Copy link
Open
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
There was a lot of discussion in #76588 about enabling logging and it was almost a 10% perf hit on some benchmarks. So as it stands, the tradeoff is probably not worth it, especially since most of the time you aren't looking at
debug!logging.However, having
debug!completely compiled out is extremely confusing the first time you go to add adebug!. While rustc-dev-guide can work on making this more discoverable, ideally this would always be on so you don't have to worry about it. I would love to get the perf impact low enough that this can be on by default (or even always on).One possible way to work towards this is by moving the more verbose logging to
trace!and compiling out trace instead. This allows keeping the (truly stupendous) amount of logging currently, but still makingdebug!work by default. Sincetrace!is rarely used, I expect this to be much less confusing for new contributors.Originally posted by @jyn514 in #76588 (comment)