#[macro_use]
extern crate common_uu;

use common_uu::get_arg;
use common_uu::toml_read::_CONFIG;
use std::ops::Deref;

fn main() {
    load_tomls!("./config/default.toml", "./config/prod.toml");
    let _watch = common_uu::toml_read::run_watch("./config/test.toml").unwrap();
    println!(
        "config: {}",
        serde_json::json!(_CONFIG.read().unwrap().deref()).to_string()
    );
    // let r = get_arg("log.filters");
    // println!("loadfiles!: {:?}", r);
    let r = get_arg("log.level");
    println!("log.level: {}", r.to_string());

    let r = get_arg("read_value");
    println!("read_value: {}", r.to_string());

    let r = get_arg("test");
    println!("test: {}", r.to_string());
}
