Skip to content

Commit 0afe337

Browse files
Merge #4007
4007: Minor logging changes r=Fraser999 a=Fraser999 This PR changes the debug output of `Message::GetResponse` to not print the full hex-encoded `serialized_item` field as it can be fairly large. It also adds a few extra lines of output to failed CI runs so the command to download the dumped files is visible above the overlaid banner. Co-authored-by: Fraser Hutchison <[email protected]>
2 parents 348ec96 + 6250b23 commit 0afe337

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

node/src/protocol.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,18 @@ impl Debug for Message {
202202
Message::GetRequest { tag, serialized_id } => f
203203
.debug_struct("GetRequest")
204204
.field("tag", tag)
205-
.field("serialized_item", &HexFmt(serialized_id))
205+
.field("serialized_id", &HexFmt(serialized_id))
206206
.finish(),
207207
Message::GetResponse {
208208
tag,
209209
serialized_item,
210210
} => f
211211
.debug_struct("GetResponse")
212212
.field("tag", tag)
213-
.field("serialized_item", &HexFmt(serialized_item))
213+
.field(
214+
"serialized_item",
215+
&format!("{} bytes", serialized_item.len()),
216+
)
214217
.finish(),
215218
Message::FinalitySignature(fs) => {
216219
f.debug_tuple("FinalitySignature").field(&fs).finish()

utils/nctl/sh/scenarios/common/itst.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function clean_up() {
3939
tar -cvzf "${DRONE_BUILD_NUMBER}"_nctl_dump.tar.gz * > /dev/null 2>&1
4040
aws s3 cp ./"${DRONE_BUILD_NUMBER}"_nctl_dump.tar.gz s3://nctl.casperlabs.io/nightly-logs/ > /dev/null 2>&1
4141
log "Download the dump file: curl -O https://s3.us-east-2.amazonaws.com/nctl.casperlabs.io/nightly-logs/${DRONE_BUILD_NUMBER}_nctl_dump.tar.gz"
42+
log "\nextra log lines to push\ndownload instructions above\nserver license expired banner\n"
4243
popd
4344
fi
4445
fi

0 commit comments

Comments
 (0)