Skip to content

Commit

Permalink
wip: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lif committed Jul 24, 2023
1 parent f871045 commit f5e0660
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions sled-agent/src/storage/dump_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,18 @@ impl DumpSetupWorker {
if let Some(path) = entry.file_name().to_str() {
let dest = debug_dir.join(path);

if let Err(err) = Self::copy_sync_and_remove(&entry.path(), &dest) {
error!(self.log, "Failed to archive {entry:?}: {err:?}");
if let Err(err) =
Self::copy_sync_and_remove(&entry.path(), &dest)
{
error!(
self.log,
"Failed to archive {entry:?}: {err:?}"
);
} else {
info!(self.log, "Relocated {entry:?} to {dest:?}");
info!(
self.log,
"Relocated {entry:?} to {dest:?}"
);
}
} else {
error!(self.log, "Non-UTF8 path found while archiving core dumps: {entry:?}");
Expand Down Expand Up @@ -519,7 +527,10 @@ impl DumpSetupWorker {
if !rotated_log_files.is_empty() {
std::fs::create_dir_all(&dest_dir)?;
let count = rotated_log_files.len();
info!(self.log, "Archiving {count} log files from {zone_name} zone");
info!(
self.log,
"Archiving {count} log files from {zone_name} zone"
);
}
for entry in rotated_log_files {
let src_name = entry.file_name().unwrap();
Expand Down

0 comments on commit f5e0660

Please sign in to comment.