diff --git a/src/main.rs b/src/main.rs index c17a3fe0..ffce2d4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ fn main() { let configuration = Configuration::new(&config); let logger = ImagLogger::init(&configuration, &config); - let rt = Runtime::new(config); + let rt = Runtime::new(configuration, config); info!("Hello, world!"); } diff --git a/src/runtime.rs b/src/runtime.rs index b7f8c40c..f781181a 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -59,22 +59,24 @@ impl log::Log for ImagLogger { pub struct Runtime<'a> { pub config : Config<'a>, + pub configuration : Cfg, } impl<'a> Runtime<'a> { - pub fn new(config : Config<'a>) -> Runtime<'a> { + pub fn new(cfg: Cfg, config : Config<'a>) -> Runtime<'a> { Runtime { config: config, + configuration: cfg, } } pub fn is_verbose(&self) -> bool { - self.config.is_verbose() + self.config.is_verbose() || self.configuration.is_verbose() } pub fn is_debugging(&self) -> bool { - self.config.is_debugging() + self.config.is_debugging() || self.configuration.is_verbose() } }