diff --git a/lib/core/libimagrt/src/logger.rs b/lib/core/libimagrt/src/logger.rs index fa6c8c28..585f2855 100644 --- a/lib/core/libimagrt/src/logger.rs +++ b/lib/core/libimagrt/src/logger.rs @@ -41,6 +41,7 @@ use libimagerror::errors::ErrorMsg as EM; type ModuleName = String; +#[derive(Debug)] enum LogDestination { Stderr, File(Arc>), @@ -52,6 +53,7 @@ impl Default for LogDestination { } } +#[derive(Debug)] struct ModuleSettings { enabled: bool, level: Option, @@ -61,6 +63,7 @@ struct ModuleSettings { } /// Logger implementation for `log` crate. +#[derive(Debug)] pub struct ImagLogger { global_loglevel : Level, diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs index 4f2a485f..a5071745 100644 --- a/lib/core/libimagrt/src/runtime.rs +++ b/lib/core/libimagrt/src/runtime.rs @@ -367,11 +367,15 @@ impl<'a> Runtime<'a> { set_max_level(logger.global_loglevel().to_level_filter()); - debug!("Init logger with {}", logger.global_loglevel()); + // safe debug output for later, after the instance itself + // is moved away + let logger_expl = format!("{:?}", logger); set_boxed_logger(Box::new(logger)) .map_err(|e| panic!("Could not setup logger: {:?}", e)) .ok(); + + trace!("Imag Logger = {}", logger_expl); } }