-
-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Description
Now log4rs can init log config from a file, but this means that the config file should be placed togother with the binary file.
like that
src/
├── log.rs
├── main.rs
└── config.tomlI can run cargo run with init::file("src/config.toml"), but after compiled, init::file can't find the config file on src/config.toml
I want to complile the config into the binary, maybe like that:
let config_string = include_str!("src/config.toml")
log4rs::init_string(config_string, Format::Toml)
// or a macro
log4rs::init_string!("src/config.toml")Or maybe there are a better way to run a binary file without a config file?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels