How can i generate this information while starting my chain???
2 Answers
To make the "startup messages" show again, I had to fix the dependency of
tracing-core
cargo update -p tracing-core --precise 0.1.28
I'm not sure if sc_cli
provides these. AFAIK it didn't.
But here is a general solution.
You could put any log in your startup function.
Example:
match cpuid::identify() {
Ok(info) => {
log::info!("Found: {} CPU, model: {}", info.vendor, info.codename);
log::info!("The full brand string is: {}", info.brand);
log::info!("Hardware AES support: {}", if info.has_feature(cpuid::CpuFeature::AES) { "yes" } else { "no" });
},
Err(err) => log::info!("cpuid error: {}", err),
};
match cpuid::clock_frequency() {
Some(frequency) => log::info!("CPU speed: {} MHz", frequency),
None => log::info!("Couldn't get CPU speed."),
};
Now, I think the question duplicates with Node startup message missing after upgrade to Polkadot v0.9.23.