Skip to content

Replace log with tracing on bridge-runtime-common #9288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions bridges/bin/runtime-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ workspace = true

[dependencies]
codec = { features = ["derive"], workspace = true }
log = { workspace = true }
scale-info = { features = ["derive"], workspace = true }
static_assertions = { optional = true, workspace = true, default-features = true }
tracing = { workspace = true }
tuplex = { workspace = true }

# Bridge dependencies
Expand Down Expand Up @@ -62,7 +62,6 @@ std = [
"codec/std",
"frame-support/std",
"frame-system/std",
"log/std",
"pallet-bridge-grandpa/std",
"pallet-bridge-messages/std",
"pallet-bridge-parachains/std",
Expand All @@ -75,6 +74,7 @@ std = [
"sp-std/std",
"sp-trie/std",
"sp-weights/std",
"tracing/std",
"tuplex/std",
"xcm/std",
]
Expand Down
6 changes: 3 additions & 3 deletions bridges/bin/runtime-common/src/messages_benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ pub fn generate_xcm_builder_bridge_message_sample(
.encoded_size(),
);

log::trace!(
tracing::trace!(
target: "runtime::bridge-benchmarks",
"generate_xcm_builder_bridge_message_sample with expected_message_size: {}, location_encoded_size: {}, xcm_size: {}, xcm_data_size: {}",
expected_message_size, location_encoded_size, xcm_size, xcm_data_size,
%expected_message_size, %location_encoded_size, %xcm_size, %xcm_data_size,
"generate_xcm_builder_bridge_message_sample"
);

let xcm = xcm::VersionedXcm::<()>::from(Xcm(vec![Instruction::<()>::ExpectPallet {
Expand Down
8 changes: 8 additions & 0 deletions prdoc/pr_9288.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: Replace `log` with `tracing` on `bridge-runtime-common`
doc:
- audience: Runtime Dev
description: This PR replaces `log` with `tracing` instrumentation on `bridge-runtime-common`
by providing structured logging.
crates:
- name: bridge-runtime-common
bump: minor
Loading