@@ -10,10 +10,11 @@ use clap::{builder::PossibleValue, Args, CommandFactory, Parser, Subcommand, Val
1010use  clap_complete:: Shell ; 
1111use  itertools:: Itertools ; 
1212use  tracing:: { info,  trace,  warn} ; 
13+ use  tracing_subscriber:: { reload:: Handle ,  EnvFilter ,  Registry } ; 
1314
1415use  crate :: { 
1516    cli:: { 
16-         common:: { self ,  PackageUpdate } , 
17+         common:: { self ,  update_console_filter ,   PackageUpdate } , 
1718        errors:: CLIError , 
1819        help:: * , 
1920        self_update:: { self ,  check_rustup_update,  SelfUpdateMode } , 
@@ -68,11 +69,11 @@ fn handle_epipe(res: Result<utils::ExitCode>) -> Result<utils::ExitCode> {
6869    after_help = RUSTUP_HELP ,  
6970) ] 
7071struct  Rustup  { 
71-     /// Enable verbose output  
72- #[ arg( short,  long) ]  
72+     /// Set log level to 'DEBUG' if 'RUSTUP_LOG' is unset  
73+ #[ arg( short,  long,  conflicts_with =  "quiet" ) ]  
7374    verbose :  bool , 
7475
75-     /// Disable progress output 
76+     /// Disable progress output, set log level to 'WARN' if 'RUSTUP_LOG' is unset  
7677#[ arg( short,  long,  conflicts_with = "verbose" ) ]  
7778    quiet :  bool , 
7879
@@ -532,7 +533,11 @@ enum SetSubcmd {
532533} 
533534
534535#[ tracing:: instrument( level = "trace" ,  fields( args = format!( "{:?}" ,  process. args_os( ) . collect:: <Vec <_>>( ) ) ) ) ]  
535- pub  async  fn  main ( current_dir :  PathBuf ,  process :  & Process )  -> Result < utils:: ExitCode >  { 
536+ pub  async  fn  main ( 
537+     current_dir :  PathBuf , 
538+     process :  & Process , 
539+     console_filter :  Handle < EnvFilter ,  Registry > , 
540+ )  -> Result < utils:: ExitCode >  { 
536541    self_update:: cleanup_self_updater ( process) ?; 
537542
538543    use  clap:: error:: ErrorKind :: * ; 
@@ -570,6 +575,8 @@ pub async fn main(current_dir: PathBuf, process: &Process) -> Result<utils::Exit
570575        } 
571576    } ; 
572577
578+     update_console_filter ( process,  & console_filter,  matches. quiet ,  matches. verbose ) ; 
579+ 
573580    let  cfg = & mut  common:: set_globals ( current_dir,  matches. quiet ,  process) ?; 
574581
575582    if  let  Some ( t)  = & matches. plus_toolchain  { 
0 commit comments