From fe3cb8202f4332a547c15c1e9fb46eb2a5f7a470 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Sun, 26 Mar 2023 14:25:58 +0200 Subject: refactor: Replace all `println!()` with log statements (#236) * refactor: Replace all println with calls to logger in `do_install()` * refactor: Replace all println with calls to logger in `verify_install_location()` * refactor: Replace all println with calls to logger in `get_northstar_release_notes()` * refactor: Replace all println with calls to logger in `update_northstar_caller()` * refactor: Replace all println with calls to logger in `install_northstar_caller()` * refactor: Replace all println with calls to logger in `apply_launcher_pr()` * refactor: Replace all println with calls to logger in `apply_mods_pr()` * refactor: Replace all println with calls to logger in `find_game_install_location()` * refactor: Replace all println with calls to logger in `install_mod_caller()` * refactor: Replace all println with calls to logger in `set_mod_enabled_status()` * refactor: Replace all println with calls to logger in `parse_installed_mods()` * refactor: Replace all println with calls to logger in `origin_install_location_detection()` * refactor: Replace all println with calls to logger in `query_thunderstore_packages_api()` * refactor: Replace all println with calls to logger in `add_batch_file()` * refactor: Replace all println with calls to logger in `extract()` * refactor: Replace all println with calls to logger in `check_is_northstar_outdated()` --- src-tauri/src/github/pull_requests.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src-tauri/src/github/pull_requests.rs') diff --git a/src-tauri/src/github/pull_requests.rs b/src-tauri/src/github/pull_requests.rs index 4bba2a2c..45a11c1c 100644 --- a/src-tauri/src/github/pull_requests.rs +++ b/src-tauri/src/github/pull_requests.rs @@ -208,7 +208,7 @@ fn add_batch_file(game_install_path: &str) { match file.write_all(batch_file_content.as_bytes()) { Err(why) => panic!("couldn't write to {}: {}", display, why), - Ok(_) => println!("successfully wrote to {}", display), + Ok(_) => log::info!("successfully wrote to {}", display), } } @@ -281,7 +281,7 @@ pub async fn apply_launcher_pr( } } - println!("All done with installing launcher PR"); + log::info!("All done with installing launcher PR"); Ok(()) } @@ -309,9 +309,9 @@ pub async fn apply_mods_pr( // Delete previously managed folder if std::fs::remove_dir_all(profile_folder.clone()).is_err() { if std::path::Path::new(&profile_folder).exists() { - println!("Failed removing previous dir"); + log::error!("Failed removing previous dir"); } else { - println!("Failed removing folder that doesn't exist. Probably cause first run"); + log::warn!("Failed removing folder that doesn't exist. Probably cause first run"); } }; @@ -331,6 +331,6 @@ pub async fn apply_mods_pr( // Add batch file to launch right profile add_batch_file(game_install_path); - println!("All done with installing mods PR"); + log::info!("All done with installing mods PR"); Ok(()) } -- cgit v1.2.3