diff --git a/lib/core/libimagrt/Cargo.toml b/lib/core/libimagrt/Cargo.toml index 31a04a8e..f9b83932 100644 --- a/lib/core/libimagrt/Cargo.toml +++ b/lib/core/libimagrt/Cargo.toml @@ -45,7 +45,7 @@ features = ["suggestions", "color", "wrap_help"] [dependencies.log] version = "0.4" default-features = false -features = ["std"] +features = ["std", "serde"] [dependencies.handlebars] version = "^1.0.5" diff --git a/lib/core/libimagrt/src/logger.rs b/lib/core/libimagrt/src/logger.rs index 8aabcb5e..956d251d 100644 --- a/lib/core/libimagrt/src/logger.rs +++ b/lib/core/libimagrt/src/logger.rs @@ -355,40 +355,10 @@ fn aggregate_module_settings(_matches: &ArgMatches, config: Option<&Value>) #[derive(Serialize, Deserialize, Debug)] struct LoggingModuleConfig { pub destinations: Option>, - pub level: Option, + pub level: Option, pub enabled: bool, } - #[derive(Serialize, Deserialize, Debug)] - enum LogLevel { - #[serde(rename = "trace")] - Trace, - - #[serde(rename = "debug")] - Debug, - - #[serde(rename = "info")] - Info, - - #[serde(rename = "warn")] - Warn, - - #[serde(rename = "error")] - Error, - } - - impl Into for LogLevel { - fn into(self) -> Level { - match self { - LogLevel::Trace => Level::Trace, - LogLevel::Debug => Level::Debug, - LogLevel::Info => Level::Info, - LogLevel::Warn => Level::Warn, - LogLevel::Error => Level::Error, - } - } - } - #[derive(Serialize, Deserialize, Debug)] struct LoggingModuleConfigMap(BTreeMap);