Skip to content

Commit 23e8254

Browse files
authored
Merge pull request #2787 from rust-lang/rustc-pull
Rustc pull update
2 parents 34153d5 + 432b6df commit 23e8254

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c78a29473a68f07012904af11c92ecffa68fcc75
1+
e7d90c695a39426baf5ae705de2f9570a72229de

src/tracing.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@ To see the logs, you need to set the `RUSTC_LOG` environment variable to your lo
1212
The full syntax of the log filters can be found in the [rustdoc
1313
of `tracing-subscriber`](https://docs.rs/tracing-subscriber/0.2.24/tracing_subscriber/filter/struct.EnvFilter.html#directives).
1414

15+
## Environment variables
16+
17+
This is an overview of the environment variables rustc accepts to customize
18+
its tracing output. The definition of these can mostly be found in `compiler/rustc_log/src/lib.rs`.
19+
20+
| Name | Usage |
21+
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
22+
| `RUSTC_LOG` | Tracing filters (see the rest of this page) |
23+
| `RUSTC_LOG_COLOR` | `always`, `never` or `auto`. |
24+
| `RUSTC_LOG_ENTRY_EXIT` | if set and not '0', log span entry/exit. |
25+
| `RUSTC_LOG_THREAD_IDS` | if set and equal to '1', also log thread ids. |
26+
| `RUSTC_LOG_BACKTRACE` | Capture and print a backtrace if a trace is emitted with a target that matches the provided string value. |
27+
| `RUSTC_LOG_LINES` | If `1`, indents log lines based on depth. |
28+
| `RUSTC_LOG_FORMAT_JSON` | If `1`, outputs logs as JSON. The exact parameters can be found in `rustc_log/src/lib.rs` but the format is *UNSTABLE*. |
29+
| `RUSTC_LOG_OUTPUT_TARGET` | If provided, logs go to the provided file name instead of stderr. |
30+
31+
32+
33+
1534
## Function level filters
1635

1736
Lots of functions in rustc are annotated with

0 commit comments

Comments
 (0)