#[macro_use]
extern crate simple_log;
use serde::Deserialize;
use simple_log::LogConfig;
#[derive(Deserialize)]
struct LogConfigWrap {
log_config: LogConfig,
}
fn main() {
let config = r#"
[log_config]
path = "./log/tmp.log"
level = "debug"
size = 10
out_kind = ["console","file"]
roll_count = 10
time_format = "%H:%M:%S.%f"
"#;
let wrap: LogConfigWrap = toml::from_str(config).unwrap();
simple_log::new(wrap.log_config).unwrap();
info!("info toml simple_log");
warn!("warn toml simple_log");
error!("error toml simple_log");
}