mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 06:21:11 +00:00
Move tracing cli args to ImportParams (#4850)
This commit is contained in:
@@ -270,8 +270,7 @@ where
|
||||
/// 1. set the panic handler
|
||||
/// 2. raise the FD limit
|
||||
/// 3. initialize the logger
|
||||
pub fn init(shared_params: &SharedParams, version: &VersionInfo) -> error::Result<()>
|
||||
{
|
||||
pub fn init(shared_params: &SharedParams, version: &VersionInfo) -> error::Result<()> {
|
||||
let full_version = sc_service::config::full_version_from_strs(
|
||||
version.version,
|
||||
version.commit
|
||||
@@ -638,8 +637,8 @@ where
|
||||
config.telemetry_endpoints = Some(TelemetryEndpoints::new(cli.telemetry_endpoints));
|
||||
}
|
||||
|
||||
config.tracing_targets = cli.shared_params.tracing_targets.into();
|
||||
config.tracing_receiver = cli.shared_params.tracing_receiver.into();
|
||||
config.tracing_targets = cli.import_params.tracing_targets.into();
|
||||
config.tracing_receiver = cli.import_params.tracing_receiver.into();
|
||||
|
||||
// Imply forced authoring on --dev
|
||||
config.force_authoring = cli.shared_params.dev || cli.force_authoring;
|
||||
|
||||
@@ -113,20 +113,6 @@ pub struct SharedParams {
|
||||
/// Sets a custom logging filter.
|
||||
#[structopt(short = "l", long = "log", value_name = "LOG_PATTERN")]
|
||||
pub log: Option<String>,
|
||||
|
||||
/// Comma separated list of targets for tracing
|
||||
#[structopt(long = "tracing-targets", value_name = "TARGETS")]
|
||||
pub tracing_targets: Option<String>,
|
||||
|
||||
/// Receiver to process tracing messages
|
||||
#[structopt(
|
||||
long = "tracing-receiver",
|
||||
value_name = "RECEIVER",
|
||||
possible_values = &TracingReceiver::variants(),
|
||||
case_insensitive = true,
|
||||
default_value = "Log"
|
||||
)]
|
||||
pub tracing_receiver: TracingReceiver,
|
||||
}
|
||||
|
||||
/// Parameters for block import.
|
||||
@@ -169,6 +155,20 @@ pub struct ImportParams {
|
||||
/// Specify the state cache size.
|
||||
#[structopt(long = "state-cache-size", value_name = "Bytes", default_value = "67108864")]
|
||||
pub state_cache_size: usize,
|
||||
|
||||
/// Comma separated list of targets for tracing
|
||||
#[structopt(long = "tracing-targets", value_name = "TARGETS")]
|
||||
pub tracing_targets: Option<String>,
|
||||
|
||||
/// Receiver to process tracing messages
|
||||
#[structopt(
|
||||
long = "tracing-receiver",
|
||||
value_name = "RECEIVER",
|
||||
possible_values = &TracingReceiver::variants(),
|
||||
case_insensitive = true,
|
||||
default_value = "Log"
|
||||
)]
|
||||
pub tracing_receiver: TracingReceiver,
|
||||
}
|
||||
|
||||
/// Parameters used to create the network configuration.
|
||||
|
||||
Reference in New Issue
Block a user