From 04b52bde74abeaa673520edcb65b48aecabb3abc Mon Sep 17 00:00:00 2001 From: blek Date: Sat, 21 Oct 2023 01:35:13 +1000 Subject: [PATCH] add a few log messages --- filed/src/env.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/filed/src/env.rs b/filed/src/env.rs index 39f60cb..7c7d80f 100644 --- a/filed/src/env.rs +++ b/filed/src/env.rs @@ -68,6 +68,9 @@ pub fn loadenv() -> Result> { if ! path.is_file() { + log::error!("Config file is not a file"); + log::info!("Trying to recover from error"); + if ! dirpath.is_dir() { log::info!("The config file directory does not exist. Trying to create it"); @@ -86,11 +89,12 @@ pub fn loadenv() -> Result> { if wrote.is_err() { log::warn!("Could not write example because of the following error: {:?}", wrote.unwrap_err()); - log::info!("Giving up"); } else { log::info!("Wrote example to {}", spath); } } + + log::info!("Giving up"); return Err(format!("CONF_FILE is {}, which is not a file!", spath).into()) } spath