Use return value: ImagLogger::init() -> fail if init failed
This commit is contained in:
parent
b772b34837
commit
22be304a3a
1 changed files with 5 additions and 1 deletions
|
@ -37,13 +37,17 @@ pub use module::bm::BM;
|
|||
pub use module::notes::Notes;
|
||||
|
||||
fn main() {
|
||||
use std::process::exit;
|
||||
use ansi_term::Colour::Yellow;
|
||||
|
||||
let yaml = load_yaml!("../etc/cli.yml");
|
||||
let app = App::from_yaml(yaml);
|
||||
let config = CliConfig::new(app);
|
||||
|
||||
ImagLogger::init(&config);
|
||||
ImagLogger::init(&config).map_err(|e| {
|
||||
error!("Could not initialize logger");
|
||||
exit(1);
|
||||
}).ok();
|
||||
|
||||
let configuration = Configuration::new(&config);
|
||||
|
||||
|
|
Loading…
Reference in a new issue