From 51c6ec27b1e843e329dfdbb423220e2a86d11788 Mon Sep 17 00:00:00 2001 From: librelois <elois@ifee.fr> Date: Sat, 2 Mar 2019 23:10:54 +0100 Subject: [PATCH] [fix] use auto log_panics when start --- bin/durs-server/Cargo.toml | 1 - lib/core/core/Cargo.toml | 1 - lib/core/core/lib.rs | 8 +++----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/durs-server/Cargo.toml b/bin/durs-server/Cargo.toml index 84e3b779..37da50e5 100644 --- a/bin/durs-server/Cargo.toml +++ b/bin/durs-server/Cargo.toml @@ -17,6 +17,5 @@ structopt= "0.2.*" durs-tui = { path = "../../lib/modules/tui" } [features] -log_panics = ["duniter-core/log_panics"] ssl = ["durs-ws2p-v1-legacy/ssl"] diff --git a/lib/core/core/Cargo.toml b/lib/core/core/Cargo.toml index 172c3820..ea95b7a5 100644 --- a/lib/core/core/Cargo.toml +++ b/lib/core/core/Cargo.toml @@ -28,4 +28,3 @@ structopt= "0.2.*" threadpool = "1.7.*" [features] -log_panics = [] diff --git a/lib/core/core/lib.rs b/lib/core/core/lib.rs index fd90de87..f97e6a97 100644 --- a/lib/core/core/lib.rs +++ b/lib/core/core/lib.rs @@ -239,11 +239,6 @@ impl<'a, 'b: 'a> DuniterCore<'b, 'a, DuRsConf> { // Init logger init_logger(profile.as_str(), self.soft_meta_datas.soft_name, &cli_args); - // Print panic! in logs - if cfg!(feature = "log_panics") { - log_panics::init(); - } - // Load global conf let (conf, keypairs) = duniter_conf::load_conf(profile.as_str()); info!("Success to load global conf."); @@ -285,6 +280,9 @@ impl<'a, 'b: 'a> DuniterCore<'b, 'a, DuRsConf> { // Store user command self.user_command = Some(UserCommand::Start()); + // Print panic! in logs + log_panics::init(); + // Start router thread self.router_sender = Some(router::start_router( self.run_duration_in_secs, -- GitLab