pub fn log_config_path() -> Result<String, &'static str>
- when we run
cargo run from root path of project, executable file is under target/debug
- when we run
cargo build --release from root path of project, executable file
is under target/release
- when we copy our target executable file to production, we assume
config/log4rs.yaml
is located at the same folder with target executable file.
- the sub folder config and log is under root.
- For debug development, executable file is under root/target/debug
- For release development, executable file is under root/target/release
- For production, executable file is under root directly