mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Enable trace timings logs for transaction factory (#4845)
* Enable trace timings logs for transaction factory.
This commit is contained in:
@@ -32,6 +32,7 @@ jsonrpc-core = "14.0.3"
|
||||
log = "0.4.8"
|
||||
rand = "0.7.2"
|
||||
structopt = { version = "0.3.8", optional = true }
|
||||
tracing = "0.1.10"
|
||||
|
||||
# primitives
|
||||
sp-authority-discovery = { version = "2.0.0", path = "../../../primitives/authority-discovery" }
|
||||
@@ -60,6 +61,7 @@ sc-offchain = { version = "2.0.0", path = "../../../client/offchain" }
|
||||
sc-rpc = { version = "2.0.0", path = "../../../client/rpc" }
|
||||
sc-basic-authorship = { version = "0.8", path = "../../../client/basic-authorship" }
|
||||
sc-service = { version = "0.8", default-features = false, path = "../../../client/service" }
|
||||
sc-tracing = { version = "2.0.0", path = "../../../client/tracing" }
|
||||
sc-telemetry = { version = "2.0.0", path = "../../../client/telemetry" }
|
||||
sc-authority-discovery = { version = "0.8", path = "../../../client/authority-discovery" }
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user