diff --git a/src/config/mod.rs b/src/config/mod.rs index 4301068..6fdf20a 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -9,7 +9,8 @@ use tracing_appender::non_blocking::WorkerGuard; use crate::util::AppState; pub async fn init(cfg_file: &String) -> (AppState, WorkerGuard) { - let path = fs::canonicalize(cfg_file).unwrap_or_else(|e| panic!("配置文件加载失败:{}", e)); + let path = fs::canonicalize(cfg_file) + .unwrap_or_else(|e| panic!("配置文件加载失败:{} - {}", e, cfg_file)); let cfg = Config::builder() .add_source(config::File::with_name(path.to_str().unwrap()))