Make init_logging more easily usable (#6620)

Instead of requiring the `LogRotationOpt`, it now requires an
`Option<LogRotationOpt>`. This makes it much more easy to use the
interface when someone isn't interested on the `LogRotationOpt`'s
This commit is contained in:
Bastian Köcher
2020-07-09 16:47:57 +02:00
committed by GitHub
parent 234e7d0c3d
commit 5bb834cc6f
3 changed files with 78 additions and 80 deletions
+1 -4
View File
@@ -63,9 +63,6 @@ struct Opt {
#[structopt(long)]
transactions: Option<usize>,
#[structopt(flatten)]
log_rotation_opt: sc_cli::LogRotationOpt,
/// Mode
///
/// "regular" for regular benchmark
@@ -80,7 +77,7 @@ fn main() {
let opt = Opt::from_args();
if !opt.json {
sc_cli::init_logger("", &opt.log_rotation_opt).expect("init_logger should not fail.");
sc_cli::init_logger("", None).expect("init_logger should not fail.");
}
let mut import_benchmarks = Vec::new();