aboutsummaryrefslogtreecommitdiff
path: root/src/admin_rpc.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-21 12:54:55 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-21 12:54:55 +0000
commitcc4f2f1cfb30e3995edf3c1174bd06b4bc0a9bf1 (patch)
treeedf151a855ea4bcc55cad64a959b430e243deffa /src/admin_rpc.rs
parent53cf4d1baaa994544c02ec12f4bea28598720aa8 (diff)
downloadgarage-cc4f2f1cfb30e3995edf3c1174bd06b4bc0a9bf1.tar.gz
garage-cc4f2f1cfb30e3995edf3c1174bd06b4bc0a9bf1.zip
Pretty logging
Diffstat (limited to 'src/admin_rpc.rs')
-rw-r--r--src/admin_rpc.rs17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/admin_rpc.rs b/src/admin_rpc.rs
index 125f897e..0e9d2338 100644
--- a/src/admin_rpc.rs
+++ b/src/admin_rpc.rs
@@ -222,12 +222,15 @@ impl AdminRpcHandler {
let version_exists = match object {
Some(o) => o.versions.iter().any(|x| x.uuid == version.uuid),
None => {
- eprintln!("No object entry found for version {:?}", version);
+ warn!(
+ "Repair versions: object for version {:?} not found",
+ version
+ );
false
}
};
if !version_exists {
- eprintln!("Marking deleted version: {:?}", version);
+ info!("Repair versions: marking version as deleted: {:?}", version);
self.garage
.version_table
.insert(&Version {
@@ -265,12 +268,18 @@ impl AdminRpcHandler {
let ref_exists = match version {
Some(v) => !v.deleted,
None => {
- eprintln!("No version found for block ref {:?}", block_ref);
+ warn!(
+ "Block ref repair: version for block ref {:?} not found",
+ block_ref
+ );
false
}
};
if !ref_exists {
- eprintln!("Marking deleted block_ref: {:?}", block_ref);
+ info!(
+ "Repair block ref: marking block_ref as deleted: {:?}",
+ block_ref
+ );
self.garage
.block_ref_table
.insert(&BlockRef {