feat: add logger and config structure

This commit is contained in:
72-S committed 2025-01-30 13:57:23 +01:00
1 parent 15abd84501
commit d9c827b3ef
11 files changed
+906 -19

No files matched your search

+21 -1
View File
@@ -1,7 +1,27 @@
use std::path::PathBuf;
use crate::config::{ensure_config_exists, load_config};
use logger::Logger;
mod cli;
pub mod logger;
pub mod macros;
pub mod tui;
pub mod config;
fn main() {
cli::init()
let default = "assets/default.toml";
let path: PathBuf = ensure_config_exists(default);
match load_config(&path) {
Ok(config) => {
Logger::init(config.variables.debug);
cli::init()
}
Err(e) => {
error!("Failed to load config file: {}", e);
}
}
}