From 1e0e6f48aca624832018714a1cc4f3997abdf69e Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Tue, 4 Apr 2023 22:57:28 +0200 Subject: [PATCH] logs --- Cargo.toml | 2 +- src/lib.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4f1a357..e3589dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "twitch_data" -version = "0.1.3" +version = "0.1.4" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/lib.rs b/src/lib.rs index f6d1ef8..4a8ea5e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ use exponential_backoff::twitch::{ check_backoff_twitch_with_client, }; use futures::future::join_all; -use log::{debug, info, trace}; +use log::{debug, info, trace, warn}; use reqwest; use serde::{Deserialize, Serialize}; use tokio::fs::File; @@ -441,7 +441,8 @@ impl<'a> TwitchClient<'a> { .await?; info!("downloading all parts of video: {}", url); - let files = self.download_all_parts(&url, &folder_path).await?; + let mut files = self.download_all_parts(&url, &folder_path).await?; + info!("downloaded all parts of video: {}", files.len()); //combine parts @@ -476,7 +477,7 @@ impl<'a> TwitchClient<'a> { match number.parse::() { Ok(n) => n, Err(e) => { - println!( + warn!( "potentially catchable error while parsing the file number: {}\n{}", number, e );