Questions tagged [logging]
The logging tag has no usage guidance.
13 questions
3
votes
1
answer
41
views
Could not cast prevote: previously known block 0x_ has disappeared
The finalization is blocked on our development chain and I have these logs:
2024-07-12 19:37:00 ✨ Imported #2208390 (0x85e0…1a0a)
2024-07-12 19:37:01 💤 Idle (14 peers), best: #2208390 (0x85e0…...
1
vote
0
answers
41
views
How to log from parachain's validate_block function
I would like to investigate and debug the way my parachain runtime's validate_block function is executing. As a first attempt I've placed some log lines in my validate_block implementation.
The ...
2
votes
1
answer
84
views
Substrate - Change logging library
Is there some way to change the logging library or at least the logging format? I need a way of having the logs output in JSON format.
What I tried:
Installed the tracing-subscriber pallet with json ...
2
votes
0
answers
56
views
Accepting new connection 1/nnn
Which crate is logging Accepting new connection 1/100? Is it in tokio? jsonrpsee? In the logs, there is no way to distinguish between new connections for the node vs for the relay. I would like to ...
5
votes
2
answers
174
views
Logging best practice for pallet extrinsics
What is the best practice for logging in pallets? Is there any overhead leaving them in at a debug/trace level? Or should we never use them outside of development?
e.g.
log::debug!("")
3
votes
2
answers
169
views
Can’t get logging to work in a custom pallet when running unit tests
I can’t get logging to work in a custom pallet when running unit tests:
RUST_LOG=runtime=debug cargo test --features rococo-local -- --nocapture
log::debug!("") doesn’t work and println!() ...
2
votes
1
answer
98
views
Why does Substrate use both Rust's Logging API crate and frame_support::log?
In the Substrate documentation here https://docs.substrate.io/test/debug/ it says we can use Rust's Logging API crate, for example as follows in a pallet:
Cargo.toml
[dependencies]
frame-support = { ...
5
votes
1
answer
105
views
How is the logging CLI implemented in substrate?
Often I've used the flags like -lruntime=debug or -lparachain=debug without really understanding how they work. I know that the env_logger crate allows you to specify which crates to emit log messages ...
3
votes
1
answer
99
views
Extrinsic execution time traces not showing up in node logs
I am trying to achieve logging of extrinsic execution time traces on parachain nodes i run myself during block import. I'm doing this through tracing instead of by weights so that I can collect data ...
2
votes
1
answer
212
views
Log messages not displayed
It seems like the substrate client::cli::init code is not properly initializing the logger: any log::info! calls (or even log::error! calls) are not being shown in the terminal. All println! outputs ...
1
vote
1
answer
65
views
No output from `try-runtime`
When running try-runtime I do not get any logs/output. Even when specifying explicitly RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace, still there is silence. However, in case of failure ...
8
votes
3
answers
203
views
Node startup message missing after upgrade to Polkadot v0.9.23
After upgrading to Polkadot v0.9.23 from v0.9.16, I am missing the default "start up" message (WS/RPC connections, hardware, para-id etc, see below) when initiating the node client, both for ...
1
vote
1
answer
56
views
How to Change Colors of Node Terminal Output?
When I run a node template with cargo run -r -- --dev I get a whole bunch of debug info in the terminal.
Is it possible to change colors of some words (phrases) in the terminal output? For example: ...