Skip to content

Consider enabling debug logging by default for contributors #76608

Open

Description

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 a debug!. 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 making debug! work by default. Since trace! is rarely used, I expect this to be much less confusing for new contributors.

Originally posted by @jyn514 in #76588 (comment)

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

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new contributors to rust itselfC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-bootstrapRelevant 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions