diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-03-26 14:25:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-26 12:25:58 +0000 |
commit | fe3cb8202f4332a547c15c1e9fb46eb2a5f7a470 (patch) | |
tree | 75e2d95334ab39a66e6c6cf4107f59136ab6dcbb /src-tauri/src/mod_management/mod.rs | |
parent | 91c1dbb72943d00eefb5564ee85671f57a349709 (diff) | |
download | FlightCore-fe3cb8202f4332a547c15c1e9fb46eb2a5f7a470.tar.gz FlightCore-fe3cb8202f4332a547c15c1e9fb46eb2a5f7a470.zip |
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()`
Diffstat (limited to 'src-tauri/src/mod_management/mod.rs')
-rw-r--r-- | src-tauri/src/mod_management/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index d2b5040b..eff3ec01 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -94,8 +94,8 @@ pub fn set_mod_enabled_status( let mut res: serde_json::Value = match get_enabled_mods(game_install.clone()) { Ok(res) => res, Err(err) => { - println!("Couldn't parse `enabledmod.json`: {}", err); - println!("Rebuilding file."); + log::warn!("Couldn't parse `enabledmod.json`: {}", err); + log::warn!("Rebuilding file."); rebuild_enabled_mods_json(game_install.clone())?; @@ -108,7 +108,7 @@ pub fn set_mod_enabled_status( // Check if key exists if res.get(mod_name.clone()).is_none() { // If it doesn't exist, rebuild `enabledmod.json` - println!("Value not found in `enabledmod.json`. Rebuilding file"); + log::info!("Value not found in `enabledmod.json`. Rebuilding file"); rebuild_enabled_mods_json(game_install.clone())?; // Then try again @@ -189,7 +189,7 @@ fn parse_installed_mods(game_install: GameInstall) -> Result<Vec<NorthstarMod>, let parsed_mod_json: ModJson = match json5::from_str(&data) { Ok(parsed_json) => parsed_json, Err(err) => { - println!("Failed parsing {} with {}", mod_json_path, err.to_string()); + log::warn!("Failed parsing {} with {}", mod_json_path, err.to_string()); continue; } }; |