Skip to content
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

Environment variable RUNTIME_LOG_LEVEL when set to 1 does not show runtime's trace #114

Closed
x3c41a opened this issue Nov 22, 2024 · 2 comments

Comments

@x3c41a
Copy link
Contributor

x3c41a commented Nov 22, 2024

Steps to reproduce:
I run ecosystem-tests with the following .env file:

LOG_LEVEL=debug # keep debug level to filter out most of chopsticks logs, ports and wasm info is still there
RUNTIME_LOG_LEVEL=1 # 1 or trace
DB_PATH=./db.sqlite
ASSETHUBPOLKADOT_WASM=./asset_hub_polkadot_runtime.compact.compressed.wasm
ASTAR_WASM=./astar_runtime.compact.compressed.wasm

There are no trace logs from the runtime, e.g.

 xcm::execute  TRACE: Executing message origin=Location { parents: 0, interior: X1([Parachain(1000)]) } message=Xcm([ReceiveTeleportedAsset(Assets([Asset { id: AssetId(Location { parents: 0, interior: Here }), fun: Fungible(7000000000000) }])), PayFees { asset: Asset { id: AssetId(Location { parents: 0, interior: Here }), fun: Fungible(7000000000000) } }, ReceiveTeleportedAsset(Assets([])), ClearOrigin, PayFees { asset: Asset { id: AssetId(Location { parents: 0, interior: Here }), fun: Fungible(400000000000) } }, SetTopic([77, 56, 17, 205, 139, 97, 6, 202, 171, 215, 147, 248, 255, 56, 159, 159, 159, 135, 14, 136, 122, 237, 73, 201, 158, 93, 209, 78, 156, 226, 168, 204])]) weight_credit=Weight { ref_time: 0, proof_size: 0 }

The only log that runtime displays is the final error, like NotHoldingFees or Message Unroutable.

I was able to reproduce the same XCM program with local wasms and chopsticks, and all the trace logs were there.
It might be that environment variables are not propagated...

@xlc
Copy link
Member

xlc commented Nov 25, 2024

Just found out the level doc in readme is wrong. trace is 5 not 1. 9836594 https://github.com/paritytech/polkadot-sdk/blob/a42dcbf610336f691c335943ab146ebeda17ae36/substrate/primitives/core/src/lib.rs#L200-L215
And make sure the wasm is built with logging enabled

@x3c41a
Copy link
Contributor Author

x3c41a commented Dec 9, 2024

I built wasm with the --release flag and set RUNTIME_LOG_LEVEL to 5. After that I was able to see the runtime log for Polkadot Asset Hub.

Thanks for looking into that issue! I also left a minor comment on the PR.

@x3c41a x3c41a closed this as completed Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants