Fix logging configuration (#1303)

One of the last commits introduced a regression, logging function was called before log subsystem was
initialized, as result all logging configuration was not applied.
This commit is contained in:
hashmap 2018-07-31 12:14:13 +02:00 committed by Yeastplume
parent 658a686cc1
commit 84e46c2872
2 changed files with 11 additions and 11 deletions

View file

@ -333,16 +333,6 @@ fn main() {
panic!("Error parsing config file: {}", e); panic!("Error parsing config file: {}", e);
}); });
if let Some(file_path) = &global_config.config_file_path {
info!(
LOGGER,
"Found configuration file at {}",
file_path.to_str().unwrap()
);
} else {
info!(LOGGER, "configuration file not found, using default");
}
// initialize the logger // initialize the logger
let mut log_conf = global_config let mut log_conf = global_config
.members .members
@ -369,6 +359,16 @@ fn main() {
log_build_info(); log_build_info();
if let Some(file_path) = &global_config.config_file_path {
info!(
LOGGER,
"Found configuration file at {}",
file_path.to_str().unwrap()
);
} else {
info!(LOGGER, "configuration file not found, using default");
}
match args.subcommand() { match args.subcommand() {
// server commands and options // server commands and options
("server", Some(server_args)) => { ("server", Some(server_args)) => {

View file

@ -15,9 +15,9 @@
//! Basic TUI to better output the overall system status and status //! Basic TUI to better output the overall system status and status
//! of various subsystems //! of various subsystems
use chrono::prelude::Utc;
use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{mpsc, Arc}; use std::sync::{mpsc, Arc};
use chrono::prelude::{Utc};
use cursive::direction::Orientation; use cursive::direction::Orientation;
use cursive::theme::BaseColor::{Black, Blue, Cyan, White}; use cursive::theme::BaseColor::{Black, Blue, Cyan, White};