Skip to content

Commit

Permalink
feat(core): make logs easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
SARDONYX-sard committed Jan 18, 2024
1 parent 809dd4c commit 7b3d215
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dar2oar_core/src/fs/converter/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ pub async fn convert_inner(
let file = &non_leaf_dir.join(file_name);
tracing::debug!("Create dirs: {:?}", &non_leaf_dir);
fs::create_dir_all(&non_leaf_dir).await?;
tracing::debug!("Copy with Nest Dir:\nfrom: {path:?}\nto: {file:?}");
tracing::debug!("Copy with Nest Dir:\n- From: {path:?}\n- To: {file:?}");
fs::copy(path, file).await?;
} else {
let file = section_root.join(file_name);
tracing::debug!("Copy:\nfrom: {path:?}\nto: {file:?}");
tracing::debug!("Copy:\n- From: {path:?}\n- To: {file:?}");
fs::create_dir_all(&section_root).await?;
fs::copy(path, file).await?;
}
Expand Down
4 changes: 2 additions & 2 deletions dar2oar_core/src/fs/converter/support_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub async fn unhide_dar(
async move {
let mut no_hidden_path = path.as_path().to_owned();
no_hidden_path.set_extension(""); // Remove .mohidden extension
tracing::debug!("Rename {idx}th:\nfrom: {path:?}\nto: {no_hidden_path:?}");
tracing::debug!("Rename {idx}th:\n- From: {path:?}\n- To: {no_hidden_path:?}\n");
fs::rename(path.as_path(), no_hidden_path).await?;

// # Ordering validity:
Expand Down Expand Up @@ -85,7 +85,7 @@ pub async fn remove_oar(
let found_once = Arc::clone(&found_once);

async move {
tracing::debug!("Try to remove oar dir: {:?}", &oar_dir);
tracing::debug!("Try to remove oar dir: {:?}\n", &oar_dir);
fs::remove_dir_all(oar_dir).await?;
// # Ordering validity:
// Use `AcqRel` to `happened before relationship`(form a memory read/write order between threads) of cas(compare_and_swap),
Expand Down

0 comments on commit 7b3d215

Please sign in to comment.