Questions tagged [logging]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers

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 ...
JoshOrndorff's user avatar
  • 1,159
2 votes
1 answer

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 ...
Branimir Malesevic's user avatar
2 votes
0 answers

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 ...
Robert La Ferla's user avatar
5 votes
2 answers

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!("")
Robert La Ferla's user avatar
3 votes
2 answers

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!() ...
Robert La Ferla's user avatar
2 votes
1 answer

Why does Substrate use both Rust's Logging API crate and frame_support::log?

In the Substrate documentation here it says we can use Rust's Logging API crate, for example as follows in a pallet: Cargo.toml [dependencies] frame-support = { ...
Luke Schoen's user avatar
  • 2,312
4 votes
1 answer

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 ...
Purple_Turtle's user avatar
3 votes
1 answer

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 ...
Garandor's user avatar
  • 121
2 votes
1 answer

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 ...
Sander's user avatar
  • 402
1 vote
1 answer

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 ...
pmikolajczyk41's user avatar
8 votes
3 answers

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 ...
0x5hmoo's user avatar
  • 187
1 vote
1 answer

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: ...
CREESTL's user avatar
  • 474