From c039dd4c1ef235b64e0e09bf3253d8d0be9dfe0b Mon Sep 17 00:00:00 2001 From: "nobu.maeda" Date: Fri, 12 Apr 2024 17:58:21 +0800 Subject: [PATCH] Add logging to JSON Persister --- src/common/persist.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/persist.rs b/src/common/persist.rs index 9565d50..e50505f 100644 --- a/src/common/persist.rs +++ b/src/common/persist.rs @@ -24,6 +24,11 @@ pub(crate) struct Persister { impl Persister { pub(crate) fn restore(data_path: impl AsRef) -> Result { let json: String = std::fs::read_to_string(data_path.as_ref())?; + debug!( + "Restored crusty-n3xB JSON from path: {} - {}", + data_path.as_ref().display().to_string(), + json + ); Ok(json) } @@ -98,7 +103,7 @@ impl Persister { }; debug!( - "Persisting JSON {} to path: {} - {}", + "Persisting crusty-n3xB JSON {} to path: {} - {}", contains_type_string, data_path.as_ref().display().to_string(), json