read config from args
This commit is contained in:
parent
bf1ee8efe8
commit
2b326c765d
1 changed files with 1 additions and 2 deletions
|
|
@ -31,8 +31,7 @@ ____ __ ____ __ __ __ _______..______ _______ .______
|
||||||
"#;
|
"#;
|
||||||
println!("{ascii}");
|
println!("{ascii}");
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
// let cfg: AppConfig = confy::load_path(Path::new(&args[1])).expect("Couldn't read config");
|
let cfg: AppConfig = confy::load_path(Path::new(&args[1])).expect("Couldn't read config");
|
||||||
let cfg: AppConfig = confy::load_path("./config.toml").expect("Couldn't read config");
|
|
||||||
match Path::new("log4rs.yaml").exists() {
|
match Path::new("log4rs.yaml").exists() {
|
||||||
true => log4rs::init_file("log4rs.yaml", Default::default()).unwrap(),
|
true => log4rs::init_file("log4rs.yaml", Default::default()).unwrap(),
|
||||||
false => println!("No log4rs.yaml file found. Logging will not be enabled")
|
false => println!("No log4rs.yaml file found. Logging will not be enabled")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue