aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/lib.rs
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-03-21 09:31:36 +0100
committerGitHub <noreply@github.com>2023-03-21 08:31:36 +0000
commit36fdc302bef162d213d6a026c99614673b24a069 (patch)
treecadbdda49542ddf5234040206676a186ebe9b440 /src-tauri/src/lib.rs
parent25791906cc8c81368af5718f8ec6ee8b4f428b31 (diff)
downloadFlightCore-36fdc302bef162d213d6a026c99614673b24a069.tar.gz
FlightCore-36fdc302bef162d213d6a026c99614673b24a069.zip
feat: Proper logging (#223)
* feat: Initial setup of sentry logging * refactor: Replace some println with log call Not replacing all cause too large diff
Diffstat (limited to 'src-tauri/src/lib.rs')
-rw-r--r--src-tauri/src/lib.rs13
1 files changed, 3 insertions, 10 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 050b4238..2e0a0250 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -1,7 +1,6 @@
use std::env;
use anyhow::{anyhow, Context, Result};
-use sentry::{add_breadcrumb, Breadcrumb, Level};
mod northstar;
@@ -61,7 +60,7 @@ pub fn check_mod_version_number(path_to_mod_folder: String) -> Result<String, an
None => return Err(anyhow!("No version number found")),
};
- println!("{}", mod_version_number);
+ log::info!("{}", mod_version_number);
Ok(mod_version_number.to_string())
}
@@ -132,7 +131,7 @@ pub fn find_game_install_location() -> Result<GameInstall, String> {
pub fn check_is_valid_game_path(game_install_path: &str) -> Result<(), String> {
let path_to_titanfall2_exe = format!("{}/Titanfall2.exe", game_install_path);
let is_correct_game_path = std::path::Path::new(&path_to_titanfall2_exe).exists();
- println!("Titanfall2.exe exists in path? {}", is_correct_game_path);
+ log::info!("Titanfall2.exe exists in path? {}", is_correct_game_path);
// Exit early if wrong game path
if !is_correct_game_path {
@@ -231,13 +230,7 @@ pub async fn install_northstar(
.ok_or_else(|| panic!("Couldn't find Northstar on thunderstore???"))
.unwrap();
- // Breadcrumb for sentry to debug crash
- add_breadcrumb(Breadcrumb {
- // category: Some("auth".into()),
- message: Some(format!("Install path \"{}\"", game_path)),
- level: Level::Info,
- ..Default::default()
- });
+ log::info!("Install path \"{}\"", game_path);
match do_install(
nmod.versions.get(&nmod.latest).unwrap(),