diff options
Diffstat (limited to 'src/launcher.rs')
| -rw-r--r-- | src/launcher.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/launcher.rs b/src/launcher.rs index 03b289d..96ba3bd 100644 --- a/src/launcher.rs +++ b/src/launcher.rs @@ -244,6 +244,8 @@ impl Launcher { path.push(filename); + debug!("Logger config {} is at {}", id, path.display()); + // creates the JVM argument for this logger config fn get_arg(arg: &str, path: &Path) -> String { strsub::replace_str(arg, |key| match key { @@ -255,7 +257,10 @@ impl Launcher { // verify the file match util::verify_file(path.as_path(), dlinfo.size, dlinfo.sha1).await { // integrity passed. return - Ok(_) => return Ok(Some(get_arg(config.client.argument.as_str(), path.as_path()))), + Ok(_) => { + info!("Log configuration {} exists and integrity matches. Skipping.", id); + return Ok(Some(get_arg(config.client.argument.as_str(), path.as_path()))); + }, // ruh roh Err(e) => match e { @@ -283,6 +288,8 @@ impl Launcher { error: e })?; + debug!("Logger configuration {} must be downloaded ({}).", id, url); + let mut response = reqwest::get(url).await.map_err(|e| LogConfigError::Download{ url: url.to_owned(), error: e })?; let mut tally = 0usize; let mut sha1 = Sha1::new(); @@ -302,6 +309,7 @@ impl Launcher { drop(file); // manually close file let del_file_silent = || async { + debug!("Deleting downloaded log config {} since its integrity doesn't match :( {}", id, path.display()); let _ = fs::remove_file(path.as_path()).await.map_err(|e| warn!("failed to delete invalid log config: {}", e)); () }; @@ -326,6 +334,8 @@ impl Launcher { })); } + info!("Log configuration {} downloaded successfully.", id); + Ok(Some(get_arg(config.client.argument.as_str(), path.as_path()))) } @@ -414,6 +424,8 @@ impl Launcher { } else { log_arg = None; } + + dbg!(log_arg); //todo!() Ok(()) |
