You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#136392 - jieyouxu:wrap-tracing, r=onur-ozkan
bootstrap: add wrapper macros for `feature = "tracing"`-gated `tracing` macros
Follow-up to rust-lang#136091 (comment).
- Add wrapper macros for `error!`, `warn!`, `info!`, `debug!` and `trace!`, which `cfg(feature = "tracing")`-gates the underlying `tracing` macros. They expand to nothing if `"tracing"` feature is not enabled.
- This is not done for `span!` or `event!` because they can return span guards, and you can't really wrap that.
- This is also not possible for `tracing::instrument` attribute proc-macro unless you use another attribute proc-macro to wrap that.
It's not *great*, because `tracing::instrument` and `tracing::{span,event}` can't be wrapped this way.
Can test locally with:
```bash
$ BOOTSTRAP_TRACING=bootstrap=TRACE ./x check src/bootstrap/
```
r? ``@onur-ozkan`` (or reroll)
0 commit comments