Companion PR for #6564 (#1350)

* Add log_rotation_opt

* Update Cargo lock

* Use SubstrateCli's log-directory instead of re-defining it
This commit is contained in:
pscott
2020-07-08 14:05:41 +02:00
committed by GitHub
parent 61ba45aaad
commit acb5875e85
3 changed files with 160 additions and 142 deletions
+158 -138
View File
File diff suppressed because it is too large Load Diff
-2
View File
@@ -84,11 +84,9 @@ pub struct RunCmd {
#[allow(missing_docs)]
#[derive(Debug, StructOpt)]
pub struct Cli {
#[allow(missing_docs)]
#[structopt(subcommand)]
pub subcommand: Option<Subcommand>,
#[allow(missing_docs)]
#[structopt(flatten)]
pub run: RunCmd,
}
+2 -2
View File
@@ -19,7 +19,7 @@ use log::info;
use service::{IdentifyVariant, self};
#[cfg(feature = "service-rewr")]
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};
fn get_exec_name() -> Option<String> {
@@ -198,7 +198,7 @@ pub fn run() -> Result<()> {
}
},
Some(Subcommand::ValidationWorker(cmd)) => {
sc_cli::init_logger("");
sc_cli::init_logger("", cli.run.base.log_rotation_opt()?)?;
if cfg!(feature = "browser") {
Err(sc_cli::Error::Input("Cannot run validation worker in browser".into()))