From 2b326c765d17a2b19822ffbca2fd90f98544f3ec Mon Sep 17 00:00:00 2001 From: Christopher Moyer Date: Tue, 17 Dec 2024 23:58:22 -0500 Subject: [PATCH] read config from args --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6bbf3bc..e50f7b7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,8 +31,7 @@ ____ __ ____ __ __ __ _______..______ _______ .______ "#; println!("{ascii}"); let args: Vec = env::args().collect(); - // 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"); + let cfg: AppConfig = confy::load_path(Path::new(&args[1])).expect("Couldn't read config"); match Path::new("log4rs.yaml").exists() { true => log4rs::init_file("log4rs.yaml", Default::default()).unwrap(), false => println!("No log4rs.yaml file found. Logging will not be enabled")