PSA: RUST_LOG for rustc got renamed to RUSTC_LOG

In the hope that y’all don’t have to waste as much time on this as I did: when working on the compiler, RUST_LOG recently got renamed to RUSTC_LOG without any deprecation warning or compatibility layer in place (that I could find).

I guess technically this is not a breaking change, but it can be quite baffling when you do the thing that always worked and suddenly it doesn’t work any more. :wink:

8 Likes

To clarify, this is about logging inside the compiler itself. The env_logger default is still RUST_LOG, so this won’t break your workflow unless you are hacking on the compiler itself.

Oh, I didn’t even know RUST_LOG is also used outside the compiler. :wink: Thanks for clarifying!

1 Like

Yeah, that was the motivation for the change: everyone uses RUST_LOG, and doing something like env RUST_LOG=debug cargo run my-app used to produce a ton of output from rustc/Cargo, with your app’s logging in the end.

7 Likes

The same change has been done to CARGO_LOG.

4 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.