Skip to content
Snippets Groups Projects
Unverified Commit 7d19364a authored by bgallois's avatar bgallois
Browse files

add log for distance oracle in main binary

parent b0e55330
No related branches found
No related tags found
1 merge request!290Fix #262 distance oracle pool index
Pipeline #38908 passed
......@@ -132,14 +132,16 @@ pub struct Completion {
#[cfg(feature = "distance-oracle")]
#[derive(Debug, clap::Parser)]
pub struct DistanceOracle {
/// Saving path.
#[clap(short = 'd', long, default_value = "/tmp/duniter/chains/gdev/distance")]
pub evaluation_result_dir: String,
/// Number of seconds between two evaluations (oneshot if absent)
/// Number of seconds between two evaluations (oneshot if absent).
#[clap(short = 'i', long)]
pub interval: Option<u64>,
/// Node used for fetching state
/// Node used for fetching state.
#[clap(short = 'u', long, default_value = "ws://127.0.0.1:9944")]
pub rpc_url: String,
/// Sets the logging level (e.g., debug, error, info, trace, warn).
#[clap(short = 'l', long, default_value = "info")]
log: log::LevelFilter,
pub log: String,
}
......@@ -285,6 +285,9 @@ pub fn run() -> sc_cli::Result<()> {
}
#[cfg(feature = "distance-oracle")]
Some(Subcommand::DistanceOracle(cmd)) => sc_cli::build_runtime()?.block_on(async move {
let mut builder = sc_cli::LoggerBuilder::new("");
builder.with_profiling(sc_cli::TracingReceiver::Log.into(), cmd.log.clone());
builder.init()?;
let client = distance_oracle::api::client(&cmd.rpc_url).await;
let settings = distance_oracle::Settings {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment