-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Add a dedicated debug-logging option to config.toml #76588
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,13 +321,19 @@ | |
# binary, otherwise they are omitted. | ||
# | ||
# Defaults to rust.debug value | ||
#debug-assertions = false | ||
#debug-assertions = debug | ||
|
||
# Whether or not debug assertions are enabled for the standard library. | ||
# Overrides the `debug-assertions` option, if defined. | ||
# | ||
# Defaults to rust.debug-assertions value | ||
#debug-assertions-std = false | ||
#debug-assertions-std = debug-assertions | ||
|
||
# Whether or not to leave debug! and trace! calls in the rust binary. | ||
# Overrides the `debug-assertions` option, if defined. | ||
# | ||
# Defaults to rust.debug-assertions value | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, so this brings up two interesting questions:
cc @jyn514, we might want an MCP or similar here to figure out what people think good defaults would be. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should start as off-by-default. There was a lot of discussion in #76588 about enabling logging and it was almost a 10% perf hit on some benchmarks: https://perf.rust-lang.org/compare.html?start=22e6099330cde0e7b1529774fe27874f8326de7a&end=ededceef5651050bda1a2058af270da498bb1333. That said, I would love to get the perf impact low enough that this can be on by default (or even always on). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
One possible way to do this is to separate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As it is implemented now, it should be off by default, and on wit debug-assertions, which matched exactly the semantics of the current config.toml |
||
#debug-logging = debug-assertions | ||
|
||
# Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`. | ||
# `0` - no debug info | ||
|
Uh oh!
There was an error while loading. Please reload this page.