@@ -57,7 +57,7 @@ pub fn tracing_subscriber(process: &Process) -> impl tracing::Subscriber {
5757/// A [`tracing::Subscriber`] [`Layer`][`tracing_subscriber::Layer`] that prints out the log
5858/// lines to the current [`Process`]' `stderr`.
5959///
60- /// When the `RUST_LOG ` environment variable is present, a standard [`tracing_subscriber`]
60+ /// When the `RUSTUP_LOG ` environment variable is present, a standard [`tracing_subscriber`]
6161/// formatter will be used according to the filtering directives set in its value.
6262/// Otherwise, this logger will use [`EventFormatter`] to mimic "classic" Rustup `stderr` output.
6363fn console_logger < S > ( process : & Process ) -> impl Layer < S >
@@ -71,12 +71,12 @@ where
7171 _ if process. var ( "NO_COLOR" ) . is_ok ( ) => false ,
7272 _ => process. stderr ( ) . is_a_tty ( process) ,
7373 } ;
74- let maybe_rust_log_directives = process. var ( "RUST_LOG " ) ;
74+ let maybe_rustup_log_directives = process. var ( "RUSTUP_LOG " ) ;
7575 let process = process. clone ( ) ;
7676 let logger = tracing_subscriber:: fmt:: layer ( )
7777 . with_writer ( move || process. stderr ( ) )
7878 . with_ansi ( has_ansi) ;
79- if let Ok ( directives) = maybe_rust_log_directives {
79+ if let Ok ( directives) = maybe_rustup_log_directives {
8080 let env_filter = EnvFilter :: builder ( )
8181 . with_default_directive ( LevelFilter :: INFO . into ( ) )
8282 . parse_lossy ( directives) ;
@@ -143,7 +143,7 @@ fn telemetry<S>(process: &Process) -> impl Layer<S>
143143where
144144 S : Subscriber + for < ' span > LookupSpan < ' span > ,
145145{
146- let env_filter = if let Ok ( directives) = process. var ( "RUST_LOG " ) {
146+ let env_filter = if let Ok ( directives) = process. var ( "RUSTUP_LOG " ) {
147147 EnvFilter :: builder ( )
148148 . with_default_directive ( LevelFilter :: TRACE . into ( ) )
149149 . parse_lossy ( directives)
0 commit comments