File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,30 @@ still get a short message per ignored `do_mir_borrowck`, but none of the things
6060calls. This helps you in looking through the calls that are happening and helps you adjust
6161your regex if you mistyped it.
6262
63+ ## Query level filters
64+
65+ Every [ query] ( query.md ) is automatically tagged with a logging span so that
66+ you can display all log messages during the execution of the query. For
67+ example, if you want to log everything during type checking:
68+
69+ ```
70+ RUSTC_LOG=[typeck]
71+ ```
72+
73+ The query arguments are included as a tracing field which means that you can
74+ filter on the debug display of the arguments. For example, the ` typeck ` query
75+ has an argument ` key: LocalDefId ` of what is being checked. You can use a
76+ regex to match on that ` LocalDefId ` to log type checking for a specific
77+ function:
78+
79+ ```
80+ RUSTC_LOG=[typeck{key=.*name_of_item.*}]
81+ ```
82+
83+ Different queries have different arguments. You can find a list of queries and
84+ their arguments in
85+ [ ` rustc_middle/src/query/mod.rs ` ] ( https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/query/mod.rs#L18 ) .
86+
6387## Broad module level filters
6488
6589You can also use filters similar to the ` log ` crate's filters, which will enable
You can’t perform that action at this time.
0 commit comments