mirror of
https://github.com/OMGeeky/twitch_data.git
synced 2026-01-03 09:55:03 +01:00
add feature flag to enable tracing instead of log
This commit is contained in:
@@ -12,7 +12,7 @@ use exponential_backoff::twitch::{
|
||||
check_backoff_twitch_with_client,
|
||||
};
|
||||
use futures::future::join_all;
|
||||
use log::{debug, error, info, trace, warn};
|
||||
use crate::prelude::*;
|
||||
use reqwest;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::fs::File;
|
||||
@@ -25,7 +25,7 @@ use twitch_api::helix::videos::Video as TwitchVideo;
|
||||
use twitch_api::types::{Timestamp, VideoPrivacy};
|
||||
use twitch_oauth2::{ClientId, ClientSecret};
|
||||
pub use twitch_types::{UserId, VideoId};
|
||||
|
||||
pub mod prelude;
|
||||
//region DownloadError
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct DownloadError {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use log::info;
|
||||
use twitch_data::prelude::info;
|
||||
use std::error::Error;
|
||||
use std::path::Path;
|
||||
|
||||
|
||||
4
src/prelude.rs
Normal file
4
src/prelude.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
#[cfg(not(feature = "tracing"))]
|
||||
pub use log::{debug, error, info, trace, warn};
|
||||
#[cfg(feature = "tracing")]
|
||||
pub use tracing::{debug, error, info, trace, warn};
|
||||
Reference in New Issue
Block a user