Let info be a default level
This commit is contained in:
parent
f501825852
commit
1818e3ab29
14
src/main.rs
14
src/main.rs
@ -1,10 +1,20 @@
|
||||
use std::env;
|
||||
|
||||
use clap;
|
||||
use log::{error, info};
|
||||
use log::{error, info, LevelFilter};
|
||||
use svtl::{get_base_url, get_content, get_relative_links, YtDlpWrapper};
|
||||
|
||||
fn init_logger() {
|
||||
let mut builder = env_logger::Builder::from_env("RUST_LOG");
|
||||
if env::var("RUST_LOG").is_err() {
|
||||
builder.filter_level(LevelFilter::Info);
|
||||
}
|
||||
builder.init();
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
env_logger::init();
|
||||
init_logger();
|
||||
|
||||
let matches = clap::Command::new("Svt Links")
|
||||
.version("1.0")
|
||||
|
Loading…
x
Reference in New Issue
Block a user