Enable trace timings logs for transaction factory (#4845)

* Enable trace timings logs for transaction factory.
This commit is contained in:
Marcio Diaz
2020-02-07 08:12:19 +01:00
committed by GitHub
parent 8c373916a4
commit 41644c2ae8
5 changed files with 30 additions and 16 deletions
+10
View File
@@ -56,6 +56,16 @@ where
_ => panic!("Factory is only supported for development and local testnet."),
}
// Setup tracing.
if let Some(tracing_targets) = cli_args.shared_params.tracing_targets.as_ref() {
let subscriber = sc_tracing::ProfilingSubscriber::new(
cli_args.shared_params.tracing_receiver.into(), tracing_targets
);
if let Err(e) = tracing::subscriber::set_global_default(subscriber) {
panic!("Unable to set global default subscriber {}", e);
}
}
let factory_state = FactoryState::new(
cli_args.mode.clone(),
cli_args.num,