mirror of
https://github.com/OMGeeky/downloader.git
synced 2026-02-23 15:38:31 +01:00
add feature to switch log to tracing
This commit is contained in:
2574
Cargo.lock
generated
2574
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
19
Cargo.toml
19
Cargo.toml
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "downloader"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
@@ -8,12 +8,11 @@ edition = "2021"
|
||||
[dependencies]
|
||||
google_bigquery_v2 = { version = "0.2", git = "https://github.com/OMGeeky/google_bigquery_v2" }
|
||||
google_youtube = { version = "0.1", git = "https://github.com/OMGeeky/google_youtube" }
|
||||
twitch_data = { version = "0.1", git = "https://github.com/OMGeeky/twitch_data" }
|
||||
downloader_config = { version = "0.4.2", git = "https://github.com/OMGeeky/downloader_config" }
|
||||
twitch_data = { version = "0.2", git = "https://github.com/OMGeeky/twitch_data" }
|
||||
downloader_config = { version = "0.4", git = "https://github.com/OMGeeky/downloader_config" }
|
||||
tokio = "1.23"
|
||||
chrono = "0.4.23"
|
||||
nameof = "1.2.2"
|
||||
log = "0.4.17"
|
||||
simplelog = "0.12.1"
|
||||
log4rs = { version = "1.2.0", features = ["compound_policy", "default", "size_trigger", "all_components", "gzip"] }
|
||||
path-clean = "1.0.1"
|
||||
@@ -21,3 +20,15 @@ path-clean = "1.0.1"
|
||||
log-panics = { version = "2", features = ["with-backtrace"] }
|
||||
env_logger = "0.10.0"
|
||||
anyhow = "1.0.70"
|
||||
|
||||
log = { version = "0.4" }
|
||||
tracing = { version = "0.1", optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
tracing = ["dep:tracing",
|
||||
"google_bigquery_v2/tracing",
|
||||
"google_youtube/tracing",
|
||||
"twitch_data/tracing",
|
||||
"downloader_config/tracing",
|
||||
]
|
||||
|
||||
@@ -12,7 +12,6 @@ use downloader_config;
|
||||
use downloader_config::Config;
|
||||
use google_bigquery_v2::prelude::*;
|
||||
use google_youtube::{scopes, PrivacyStatus, YoutubeClient};
|
||||
use log::{debug, error, info, trace, warn};
|
||||
use nameof::name_of;
|
||||
use path_clean::clean;
|
||||
use tokio::io::BufReader;
|
||||
|
||||
@@ -8,7 +8,7 @@ use anyhow::{anyhow, Result};
|
||||
use google_bigquery_v2::prelude::*;
|
||||
use google_youtube::scopes;
|
||||
use google_youtube::YoutubeClient;
|
||||
use log::{debug, error, info, trace, warn};
|
||||
use downloader::prelude::*;
|
||||
use log4rs::append::console::ConsoleAppender;
|
||||
use log4rs::append::rolling_file::policy::compound::roll;
|
||||
use log4rs::append::rolling_file::policy::compound::roll::fixed_window::FixedWindowRoller;
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
|
||||
#[cfg(not(feature = "tracing"))]
|
||||
use log::{debug, error, info, trace, warn};
|
||||
#[cfg(feature = "tracing")]
|
||||
pub use tracing::{debug, error, info, trace, warn};
|
||||
|
||||
|
||||
pub use log::LevelFilter;
|
||||
@@ -3,8 +3,7 @@ use std::path::{Path, PathBuf};
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
// use bigquery_googleapi::BigqueryClient;
|
||||
use google_bigquery_v2::prelude::*;
|
||||
use log::LevelFilter;
|
||||
use log::{debug, info};
|
||||
use downloader::prelude::*;
|
||||
|
||||
use downloader;
|
||||
use downloader::data::{Streamers, VideoData, VideoMetadata, Videos};
|
||||
|
||||
Reference in New Issue
Block a user