From 00b4b7f947401587de94d0cb00f5bade2dd455d3 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Fri, 5 Apr 2024 20:44:54 +0200 Subject: [PATCH 1/4] Improve informant message --- substrate/client/informant/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/substrate/client/informant/src/lib.rs b/substrate/client/informant/src/lib.rs index 7db80bb2d972..e2bced61ee0b 100644 --- a/substrate/client/informant/src/lib.rs +++ b/substrate/client/informant/src/lib.rs @@ -187,10 +187,12 @@ where last_blocks.pop_front(); } + let best_indicator = if n.is_new_best { "🌟" } else { "✨" }; info!( target: "substrate", - "✨ Imported #{} ({})", + "{best_indicator} Imported #{} ({} -> {})", format.print_with_color(Colour::White.bold(), n.header.number()), + n.header.parent_hash(), n.hash, ); } From bc6e06dc594e963a77b0371f33bed015aef453c3 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 8 Apr 2024 14:56:45 +0200 Subject: [PATCH 2/4] Update substrate/client/informant/src/lib.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bastian KΓΆcher --- substrate/client/informant/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/client/informant/src/lib.rs b/substrate/client/informant/src/lib.rs index e2bced61ee0b..f334a92f348c 100644 --- a/substrate/client/informant/src/lib.rs +++ b/substrate/client/informant/src/lib.rs @@ -187,7 +187,7 @@ where last_blocks.pop_front(); } - let best_indicator = if n.is_new_best { "🌟" } else { "✨" }; + let best_indicator = if n.is_new_best { "πŸ†" } else { "πŸ†•" }; info!( target: "substrate", "{best_indicator} Imported #{} ({} -> {})", From 7dece31b5f17be6ae6bfb0b70bb63998714ba727 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 8 Apr 2024 14:57:23 +0200 Subject: [PATCH 3/4] Use arrow symbol --- substrate/client/informant/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/client/informant/src/lib.rs b/substrate/client/informant/src/lib.rs index f334a92f348c..af778529ffc5 100644 --- a/substrate/client/informant/src/lib.rs +++ b/substrate/client/informant/src/lib.rs @@ -190,7 +190,7 @@ where let best_indicator = if n.is_new_best { "πŸ†" } else { "πŸ†•" }; info!( target: "substrate", - "{best_indicator} Imported #{} ({} -> {})", + "{best_indicator} Imported #{} ({} β†’ {})", format.print_with_color(Colour::White.bold(), n.header.number()), n.header.parent_hash(), n.hash, From 4cbce0cfb7e13951289f45551fdbb8d1cb521b70 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Mon, 8 Apr 2024 15:06:42 +0200 Subject: [PATCH 4/4] prdoc --- prdoc/pr_4021.prdoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 prdoc/pr_4021.prdoc diff --git a/prdoc/pr_4021.prdoc b/prdoc/pr_4021.prdoc new file mode 100644 index 000000000000..1f3a2748d133 --- /dev/null +++ b/prdoc/pr_4021.prdoc @@ -0,0 +1,13 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Improve log output for block imports + +doc: + - audience: Node Operator + description: | + Nodes now print the parent hash on import notification log messages. In addition, the emoji + of the log message indicates whether the block was imported as best block or not. "πŸ†" is used for + best blocks, "πŸ†•" for other imported blocks. + +crates: [ ]