Commit ad5baf4f authored by RILLING Louis's avatar RILLING Louis
Browse files

tansiv-client: Feature-gate usage of an internal logger

parent 77308369
Pipeline #178955 failed with stages
in 10 minutes and 37 seconds
......@@ -9,6 +9,7 @@ default = []
process = ["tansiv-client/process"]
qemu = ["tansiv-client/qemu"]
deadline-handler-debug = ["tansiv-client/deadline-handler-debug"]
use-own-logger = ["tansiv-client/use-own-logger"]
[dependencies]
tansiv-client = {version = "0.1.0", path = "../tansiv-client"}
......
......@@ -9,6 +9,7 @@ default = []
process = []
qemu = []
deadline-handler-debug = []
use-own-logger = ["simple_logger"]
test-helpers = ["simple_logger"]
[dependencies]
......
......@@ -287,6 +287,9 @@ pub fn init<I>(args: I, recv_callback: RecvCallback) -> Result<Arc<Context>>
I::Item: Into<std::ffi::OsString> + Clone {
use structopt::StructOpt;
#[cfg(all(feature = "use-own-logger", not(any(test, feature = "test-helpers"))))]
simple_logger::SimpleLogger::from_env().init().or_else(|e| Err(std::io::Error::new(std::io::ErrorKind::Other, e)))?;
let config = Config::from_iter_safe(args).or_else(|e| Err(std::io::Error::new(std::io::ErrorKind::Other, e)))?;
debug!("{:?}", config);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment