add error log

This commit is contained in:
weisd
2025-06-11 23:44:22 +08:00
parent 8d636dba7f
commit d529b9abbd
+7 -2
View File
@@ -69,9 +69,14 @@ impl<'a> MultiWriter<'a> {
}
Err(std::io::Error::other(format!(
"Failed to write data: (offline-disks={}/{})",
"Failed to write data: (offline-disks={}/{}): {}",
count_errs(&self.errs, &Error::DiskNotFound),
self.writers.len()
self.writers.len(),
self.errs
.iter()
.map(|e| e.as_ref().map_or("<nil>".to_string(), |e| e.to_string()))
.collect::<Vec<_>>()
.join(", ")
)))
}
}