Skip to content
Snippets Groups Projects
Commit acb5875e authored by pscott's avatar pscott Committed by GitHub
Browse files

Companion PR for #6564 (#1350)

* Add log_rotation_opt

* Update Cargo lock

* Use SubstrateCli's log-directory instead of re-defining it
parent 61ba45aa
No related merge requests found
This diff is collapsed.
...@@ -84,11 +84,9 @@ pub struct RunCmd { ...@@ -84,11 +84,9 @@ pub struct RunCmd {
#[allow(missing_docs)] #[allow(missing_docs)]
#[derive(Debug, StructOpt)] #[derive(Debug, StructOpt)]
pub struct Cli { pub struct Cli {
#[allow(missing_docs)]
#[structopt(subcommand)] #[structopt(subcommand)]
pub subcommand: Option<Subcommand>, pub subcommand: Option<Subcommand>,
#[allow(missing_docs)]
#[structopt(flatten)] #[structopt(flatten)]
pub run: RunCmd, pub run: RunCmd,
} }
...@@ -19,7 +19,7 @@ use log::info; ...@@ -19,7 +19,7 @@ use log::info;
use service::{IdentifyVariant, self}; use service::{IdentifyVariant, self};
#[cfg(feature = "service-rewr")] #[cfg(feature = "service-rewr")]
use service_new::{IdentifyVariant, self as service}; use service_new::{IdentifyVariant, self as service};
use sc_cli::{SubstrateCli, Result, RuntimeVersion, Role}; use sc_cli::{CliConfiguration, SubstrateCli, Result, RuntimeVersion, Role};
use crate::cli::{Cli, Subcommand}; use crate::cli::{Cli, Subcommand};
fn get_exec_name() -> Option<String> { fn get_exec_name() -> Option<String> {
...@@ -198,7 +198,7 @@ pub fn run() -> Result<()> { ...@@ -198,7 +198,7 @@ pub fn run() -> Result<()> {
} }
}, },
Some(Subcommand::ValidationWorker(cmd)) => { Some(Subcommand::ValidationWorker(cmd)) => {
sc_cli::init_logger(""); sc_cli::init_logger("", cli.run.base.log_rotation_opt()?)?;
if cfg!(feature = "browser") { if cfg!(feature = "browser") {
Err(sc_cli::Error::Input("Cannot run validation worker in browser".into())) Err(sc_cli::Error::Input("Cannot run validation worker in browser".into()))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment