@@ -61,6 +61,7 @@ use clap::ValueEnum;
61
61
use itertools:: Itertools ;
62
62
use same_file:: Handle ;
63
63
use serde:: { Deserialize , Serialize } ;
64
+ use tracing:: { error, info, trace, warn} ;
64
65
65
66
use crate :: currentprocess:: terminalsource;
66
67
use crate :: errors:: RustupError ;
@@ -237,7 +238,7 @@ impl<'a> InstallOpts<'a> {
237
238
Some ( MaybeOfficialToolchainName :: Some ( s) ) => s. into ( ) ,
238
239
} ;
239
240
let resolved = partial_channel. resolve ( & host_triple) ?;
240
- debug ! ( "Successfully resolved installation toolchain as: {resolved}" ) ;
241
+ trace ! ( "Successfully resolved installation toolchain as: {resolved}" ) ;
241
242
Ok ( ( ) )
242
243
}
243
244
}
@@ -497,7 +498,7 @@ static DEFAULT_UPDATE_ROOT: &str = "https://static.rust-lang.org/rustup";
497
498
fn update_root ( process : & Process ) -> String {
498
499
process
499
500
. var ( "RUSTUP_UPDATE_ROOT" )
500
- . inspect ( |url| debug ! ( "`RUSTUP_UPDATE_ROOT` has been set to `{url}`" ) )
501
+ . inspect ( |url| trace ! ( "`RUSTUP_UPDATE_ROOT` has been set to `{url}`" ) )
501
502
. unwrap_or_else ( |_| String :: from ( DEFAULT_UPDATE_ROOT ) )
502
503
}
503
504
@@ -985,8 +986,8 @@ async fn maybe_install_rust(
985
986
986
987
pub ( crate ) fn uninstall ( no_prompt : bool , process : & Process ) -> Result < utils:: ExitCode > {
987
988
if NEVER_SELF_UPDATE {
988
- err ! ( "self-uninstall is disabled for this build of rustup" ) ;
989
- err ! ( "you should probably use your system package manager to uninstall rustup" ) ;
989
+ error ! ( "self-uninstall is disabled for this build of rustup" ) ;
990
+ error ! ( "you should probably use your system package manager to uninstall rustup" ) ;
990
991
return Ok ( utils:: ExitCode ( 1 ) ) ;
991
992
}
992
993
@@ -1112,8 +1113,8 @@ pub(crate) async fn update(cfg: &Cfg<'_>) -> Result<utils::ExitCode> {
1112
1113
match update_permitted {
1113
1114
HardFail => {
1114
1115
// TODO: Detect which package manager and be more useful.
1115
- err ! ( "self-update is disabled for this build of rustup" ) ;
1116
- err ! ( "you should probably use your system package manager to update rustup" ) ;
1116
+ error ! ( "self-update is disabled for this build of rustup" ) ;
1117
+ error ! ( "you should probably use your system package manager to update rustup" ) ;
1117
1118
return Ok ( utils:: ExitCode ( 1 ) ) ;
1118
1119
}
1119
1120
Skip => {
@@ -1126,7 +1127,7 @@ pub(crate) async fn update(cfg: &Cfg<'_>) -> Result<utils::ExitCode> {
1126
1127
match prepare_update ( cfg. process ) . await ? {
1127
1128
Some ( setup_path) => {
1128
1129
let Some ( version) = get_and_parse_new_rustup_version ( & setup_path) else {
1129
- err ! ( "failed to get rustup version" ) ;
1130
+ error ! ( "failed to get rustup version" ) ;
1130
1131
return Ok ( utils:: ExitCode ( 1 ) ) ;
1131
1132
} ;
1132
1133
0 commit comments