aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/github
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/github
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/github')
-rw-r--r--src-tauri/src/github/release_notes.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src-tauri/src/github/release_notes.rs b/src-tauri/src/github/release_notes.rs
index b59358ec..e8e5c1fa 100644
--- a/src-tauri/src/github/release_notes.rs
+++ b/src-tauri/src/github/release_notes.rs
@@ -20,7 +20,7 @@ pub struct FlightCoreVersion {
// Fetches repo release API and returns response as string
pub async fn fetch_github_releases_api(url: &str) -> Result<String, String> {
- println!("Fetching releases notes from GitHub API");
+ log::info!("Fetching releases notes from GitHub API");
let client = reqwest::Client::new();
let res = client
@@ -40,13 +40,13 @@ pub async fn fetch_github_releases_api(url: &str) -> Result<String, String> {
#[tauri::command]
pub async fn get_newest_flightcore_version() -> Result<FlightCoreVersion, String> {
// Get newest version number from GitHub API
- println!("Checking GitHub API");
+ log::info!("Checking GitHub API");
let url = "https://api.github.com/repos/R2NorthstarTools/FlightCore/releases/latest";
let res = fetch_github_releases_api(url).await?;
let flightcore_version: FlightCoreVersion =
serde_json::from_str(&res).expect("JSON was not well-formatted");
- println!("Done checking GitHub API");
+ log::info!("Done checking GitHub API");
Ok(flightcore_version)
}