@@ -57,7 +57,7 @@ pub fn tracing_subscriber(process: &Process) -> impl tracing::Subscriber {
57
57
/// A [`tracing::Subscriber`] [`Layer`][`tracing_subscriber::Layer`] that prints out the log
58
58
/// lines to the current [`Process`]' `stderr`.
59
59
///
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`]
61
61
/// formatter will be used according to the filtering directives set in its value.
62
62
/// Otherwise, this logger will use [`EventFormatter`] to mimic "classic" Rustup `stderr` output.
63
63
fn console_logger < S > ( process : & Process ) -> impl Layer < S >
@@ -71,12 +71,12 @@ where
71
71
_ if process. var ( "NO_COLOR" ) . is_ok ( ) => false ,
72
72
_ => process. stderr ( ) . is_a_tty ( process) ,
73
73
} ;
74
- let maybe_rust_log_directives = process. var ( "RUST_LOG " ) ;
74
+ let maybe_rustup_log_directives = process. var ( "RUSTUP_LOG " ) ;
75
75
let process = process. clone ( ) ;
76
76
let logger = tracing_subscriber:: fmt:: layer ( )
77
77
. with_writer ( move || process. stderr ( ) )
78
78
. with_ansi ( has_ansi) ;
79
- if let Ok ( directives) = maybe_rust_log_directives {
79
+ if let Ok ( directives) = maybe_rustup_log_directives {
80
80
let env_filter = EnvFilter :: builder ( )
81
81
. with_default_directive ( LevelFilter :: INFO . into ( ) )
82
82
. parse_lossy ( directives) ;
@@ -143,7 +143,7 @@ fn telemetry<S>(process: &Process) -> impl Layer<S>
143
143
where
144
144
S : Subscriber + for < ' span > LookupSpan < ' span > ,
145
145
{
146
- let env_filter = if let Ok ( directives) = process. var ( "RUST_LOG " ) {
146
+ let env_filter = if let Ok ( directives) = process. var ( "RUSTUP_LOG " ) {
147
147
EnvFilter :: builder ( )
148
148
. with_default_directive ( LevelFilter :: TRACE . into ( ) )
149
149
. parse_lossy ( directives)
0 commit comments