Skip to content

Commit

Permalink
Add logging to JSON Persister
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu-maeda committed Apr 12, 2024
1 parent a011434 commit c039dd4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/common/persist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ pub(crate) struct Persister {
impl Persister {
pub(crate) fn restore(data_path: impl AsRef<Path>) -> Result<String, N3xbError> {
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)
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c039dd4

Please sign in to comment.