From 404e9deed2c4f7933126a25adb0060b5fc1d173c Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 20 Feb 2018 17:28:54 +0100 Subject: [PATCH 1/5] Add some debug output --- lib/domain/libimagdiary/src/diary.rs | 1 + lib/domain/libimagdiary/src/is_in_diary.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/domain/libimagdiary/src/diary.rs b/lib/domain/libimagdiary/src/diary.rs index 896d439a..a917d68f 100644 --- a/lib/domain/libimagdiary/src/diary.rs +++ b/lib/domain/libimagdiary/src/diary.rs @@ -82,6 +82,7 @@ impl Diary for Store { // Get an iterator for iterating over all entries fn entries(&self, diary_name: &str) -> Result { + debug!("Building iterator for module 'diary' with diary name = '{}'", diary_name); self.retrieve_for_module("diary") .map(|iter| DiaryEntryIterator::new(self, String::from(diary_name), iter)) .chain_err(|| DEK::StoreReadError) diff --git a/lib/domain/libimagdiary/src/is_in_diary.rs b/lib/domain/libimagdiary/src/is_in_diary.rs index 31fa7d88..90fdd0e1 100644 --- a/lib/domain/libimagdiary/src/is_in_diary.rs +++ b/lib/domain/libimagdiary/src/is_in_diary.rs @@ -43,6 +43,7 @@ impl IsInDiary for Entry { impl IsInDiary for StoreId { fn is_in_diary(&self, name: &str) -> bool { + debug!("Check: is in diary '{}'", name); self.is_in_collection(&["diary", name]) } From 848bdd98d72f60111f12cbfe61a670110c9dc95a Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 20 Feb 2018 17:32:30 +0100 Subject: [PATCH 2/5] Add changelog for libimagdiary marker fix --- doc/src/09020-changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/src/09020-changelog.md b/doc/src/09020-changelog.md index 8187fbe3..872f3701 100644 --- a/doc/src/09020-changelog.md +++ b/doc/src/09020-changelog.md @@ -49,6 +49,7 @@ This section contains the changelog from the last release to the next release. For that, `libimagerror` got a `Result` extension which can translate errors into exit codes and one for unwrapping or exiting with the `Err(i32)` from the result. + * `libimagdiary` did not add the header markers on diary entries. ## 0.6.1 From 0315ee4fc29685b3673568756e777092fe4e9be6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 20 Feb 2018 17:32:52 +0100 Subject: [PATCH 3/5] Add changelog for imag-diary diary name presence fix --- doc/src/09020-changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/src/09020-changelog.md b/doc/src/09020-changelog.md index 872f3701..69bb50be 100644 --- a/doc/src/09020-changelog.md +++ b/doc/src/09020-changelog.md @@ -50,6 +50,9 @@ This section contains the changelog from the last release to the next release. errors into exit codes and one for unwrapping or exiting with the `Err(i32)` from the result. * `libimagdiary` did not add the header markers on diary entries. + * `imag-diary` used the default diary rather than the CLI setting. Now it + rather uses the CLI setting and only if that is not present, it uses the + default. ## 0.6.1 From c4b33005fdf06782bc80993bdc77238870217299 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 20 Feb 2018 17:46:50 +0100 Subject: [PATCH 4/5] Increase gap size --- bin/core/imag/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/core/imag/src/main.rs b/bin/core/imag/src/main.rs index 18820c4d..2bbf101d 100644 --- a/bin/core/imag/src/main.rs +++ b/bin/core/imag/src/main.rs @@ -198,7 +198,7 @@ fn main() { .map(|v| v.stdout) { Ok(s) => match String::from_utf8(s) { - Ok(s) => format!("{:10} -> {}", command, s), + Ok(s) => format!("{:15} -> {}", command, s), Err(e) => format!("UTF8 Error while working with output of imag{}: {:?}", command, e), }, Err(e) => format!("Failed calling imag-{} -> {:?}", command, e), From a72f6482f6fb2806b0d3805b18b6906da3e4c49b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 20 Feb 2018 19:25:49 +0100 Subject: [PATCH 5/5] Add changelog for libimagerror trace writeln!() fix --- doc/src/09020-changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/src/09020-changelog.md b/doc/src/09020-changelog.md index 69bb50be..f060d4c7 100644 --- a/doc/src/09020-changelog.md +++ b/doc/src/09020-changelog.md @@ -53,6 +53,8 @@ This section contains the changelog from the last release to the next release. * `imag-diary` used the default diary rather than the CLI setting. Now it rather uses the CLI setting and only if that is not present, it uses the default. + * `libimagerror` printed errors with `write!()` rather than `writeln!()` + when tracing. ## 0.6.1