From cb0fcaffdece53265063272c5d59c10d83bb569e Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 1 Nov 2018 21:35:40 +0100 Subject: [PATCH] Remove logging calls in favour of debug calls Signed-off-by: Matthias Beyer --- lib/core/libimagstore/src/util.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/core/libimagstore/src/util.rs b/lib/core/libimagstore/src/util.rs index e19fcc19..7a73f36d 100644 --- a/lib/core/libimagstore/src/util.rs +++ b/lib/core/libimagstore/src/util.rs @@ -69,8 +69,14 @@ pub fn entry_buffer_to_header_content(buf: &str) -> Result<(Value, String)> { #[cfg(test)] mod test { + extern crate env_logger; + use super::entry_buffer_to_header_content; + fn setup_logging() { + let _ = env_logger::try_init(); + } + fn mkfile(content: &str) -> String { format!(r#"--- [imag] @@ -97,16 +103,17 @@ version = '{version}' #[test] fn test_entry_buffer_to_header_content_2() { + setup_logging(); let content = r#"Hai "#; let file = mkfile(&content); - eprintln!("FILE: <<<{}>>>", file); + debug!("FILE: <<<{}>>>", file); let res = entry_buffer_to_header_content(&file); assert!(res.is_ok()); let (_, res_content) = res.unwrap(); - eprintln!("CONTENT: <<<{}>>>", res_content); + debug!("CONTENT: <<<{}>>>", res_content); assert_eq!(res_content, content) }