data hexdump in warning

This commit is contained in:
Alex Auvolat 2020-11-20 23:37:34 +01:00
parent f9be964c3f
commit a8b3c8fd58
3 changed files with 43 additions and 0 deletions

39
Cargo.lock generated
View File

@ -15,6 +15,16 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034"
[[package]]
name = "arrayvec"
version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06f59fe10306bb78facd90d28c2038ad23ffaaefa85bac43c8a434cde383334f"
dependencies = [
"nodrop",
"odds",
]
[[package]]
name = "async-trait"
version = "0.1.36"
@ -588,6 +598,7 @@ dependencies = [
"garage_rpc 0.1.0",
"garage_util 0.1.0",
"hex",
"hexdump",
"log",
"rand",
"rmp-serde",
@ -743,6 +754,16 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
[[package]]
name = "hexdump"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "850f3f2c33d20c0f96c4485e087dd580ff041d720988ebf4c84a42acf739262b"
dependencies = [
"arrayvec",
"itertools",
]
[[package]]
name = "hmac"
version = "0.7.1"
@ -870,6 +891,12 @@ dependencies = [
"libc",
]
[[package]]
name = "itertools"
version = "0.4.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4a9b56eb56058f43dc66e58f40a214b2ccbc9f3df51861b63d51dec7b65bc3f"
[[package]]
name = "itoa"
version = "0.4.6"
@ -1027,6 +1054,12 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "nodrop"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
[[package]]
name = "num-integer"
version = "0.1.43"
@ -1056,6 +1089,12 @@ dependencies = [
"libc",
]
[[package]]
name = "odds"
version = "0.2.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eae0151b9dacf24fcc170d9995e511669a082856a91f958a2fe380bfab3fb22"
[[package]]
name = "once_cell"
version = "1.4.0"

View File

@ -21,6 +21,7 @@ rand = "0.7"
hex = "0.3"
arc-swap = "0.4"
log = "0.4"
hexdump = "0.1"
sled = "0.31"

View File

@ -464,6 +464,9 @@ where
Some(x) => Ok(x),
None => {
warn!("Unable to decode entry of {}: {}", self.name, e);
for line in hexdump::hexdump_iter(bytes) {
debug!("{}", line);
}
Err(e.into())
}
},