-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add a way to give backtraces for logging #90698
Comments
@rustbot claim |
Hi @wihobbs, I'm interested in working on this issue, are you still working on it ? If not could I take it from now and try to actually solve it someway or another ? |
Hi @AkechiShiro, yes, I'm still working on it. Been bogged down with a few other things lately but if you'd like I'm happy to collaborate! |
Hi @wihobbs, sure I'm fine in collaborating for this issue, is there any way to know what is WIP at the moment? And how I could get started on this issue ? What do you suggest I look at first or play around with ? Did you understand how you could use the Layer object mentioned in the first message? |
@rustbot claim |
Hi @jyn514
I understand that this issue is about getting backtraces for logging without rebuilding the compiler but may I ask if you mean there is already a way to get a backtrace for each I'm sorry if this is a newbie question..! |
Yes, you can turn the |
@jyn514 |
…oli-obk Add log-backtrace option to show backtraces along with logging according to rust-lang#90698, I added a compiler option, `-Zlog-backtrace=filter`, where `filter` is a module name, to show backtraces for logging without rebuilding. resolve rust-lang#90698
…oli-obk Add log-backtrace option to show backtraces along with logging according to rust-lang#90698, I added a compiler option, `-Zlog-backtrace=filter`, where `filter` is a module name, to show backtraces for logging without rebuilding. resolve rust-lang#90698
…oli-obk Add log-backtrace option to show backtraces along with logging according to rust-lang#90698, I added a compiler option, `-Zlog-backtrace=filter`, where `filter` is a module name, to show backtraces for logging without rebuilding. resolve rust-lang#90698
I ran into the following problem today: I had a prebuilt (with
download-rustc
) compiler and wanted to get a backtrace for someinfo!
logging it was outputting, to see how it got to that point. But there's no way to get a backtrace there without rebuilding the compiler from source. It would be really cool if there were a way to have backtraces for each individual logging call. To avoid making the compiler horrifically slow, it could be behind a-Zlog-backtrace=filter
flag.This would be useful even if you have a local build of the compiler, since you don't have to rebuild it each time you want to get a stack trace.
@davidbarsky suggests doing this by adding a custom
Layer
which filters based on a string. Debugging options are handled aroundrust/compiler/rustc_session/src/options.rs
Line 1030 in eee8b9c
The text was updated successfully, but these errors were encountered: