-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Conversation
xcm/src/v0/traits.rs
Outdated
log::debug!( | ||
target: "xcm::execute_xcm", | ||
"origin: {:?}, message: {:?}, weight_limit: {:?}", | ||
&origin, &message, weight_limit, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log I feel unsure about
Feels useful to be able to just add -lxcm=debug
and get some measure of logging, but also adds this to (most) every implementation automatically. Also doesn't capture direct calls to execute_xcm_in_credit
(which e.g. teleport_assets
does).
Can we confirm this is zero cost to the performance? (someone from the core dev team can probably comment) Otherwise, a great idea imo |
Another general point: Compared to the amount of logging I just added to my Polkadot branch this is quite coarse-grained. |
based on my understanding of |
Basti confirmed that logging is stripped for release builds of wasm runtimes. |
Just a quick and random chime in: if you are interested, there is an easy way to double check. Get the release wasm binary and run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing, using the function name as target sounds like a good idea. However, this is done nowhere else, so yeah, not sure we should start using it here?
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
bot merge |
Trying merge. |
* master: (33 commits) Update all weights, add run_all_benches.sh script (#3400) Enable over-bridge-messaging in Rococo/Wococo runtime (#3377) paras.rs to FRAME V2 (#3403) Add XCM Tracing (#3353) Use MaxEncodedLen trait from new parity-scale-codec v2.2 (#3412) bump a bunch of deps in parity-common (#3402) Warn on low connectivity. (#3408) origin to frame v2 (#3405) Enable logging in the puppet worker (#3411) make it easier to dbg stalls (#3351) XCM `canonicalize` + `prepend_with` fix (#3269) cleanup stream polls (#3397) Staking Miner (#3141) Companion for Substrate#8953 (#3140) Bump version, specs & substrate in prep for v0.9.8 (#3387) Fix busy loops. (#3392) Minor refactor (#3386) add simnet tests (#3381) BEEFY: adjust gossip (#3372) Companion for #9193 (#3376) ...
This PR adds
log::trace
logging for a selection of XCM methods.This includes:
log::debug
(should this also be trace?) the genericexecute_xcm
implementationThe logging choices are tentative and open for feedback. Let me know what should be added/removed.
Usage
Add
-lxcm=trace
to any Polkadot node.