diff --git a/Cargo.lock b/Cargo.lock index 5191a8f..eae9d8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,7 +84,7 @@ dependencies = [ [[package]] name = "alfis" -version = "0.7.2" +version = "0.7.3" dependencies = [ "base64", "bincode", diff --git a/Cargo.toml b/Cargo.toml index 05ee3df..7f0812c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "alfis" -version = "0.7.2" +version = "0.7.3" authors = ["Revertron "] edition = "2021" build = "build.rs" diff --git a/src/main.rs b/src/main.rs index 2e7156f..aacf7ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -252,8 +252,8 @@ fn setup_logger(opt_matches: &Matches, console_attached: bool) { if opt_matches.opt_present("t") || env::var(ALFIS_TRACE).is_ok() { level = LevelFilter::Trace; } - let config = ConfigBuilder::new() - .add_filter_ignore_str("mio::poll") + let mut builder = ConfigBuilder::new(); + builder.add_filter_ignore_str("mio::poll") .add_filter_ignore_str("rustls::client") .add_filter_ignore_str("ureq::") .set_thread_level(LevelFilter::Error) @@ -261,10 +261,12 @@ fn setup_logger(opt_matches: &Matches, console_attached: bool) { .set_target_level(LevelFilter::Error) .set_level_padding(LevelPadding::Right) .set_time_level(LevelFilter::Error) - .set_time_format_custom(format_description!("[hour]:[minute]:[second].[subsecond digits:3]")) - .set_time_offset_to_local() - .unwrap() - .build(); + .set_time_format_custom(format_description!("[hour]:[minute]:[second].[subsecond digits:3]")); + let config = match builder.set_time_offset_to_local() { + Ok(config) => config, + Err(config) => config + }; + let config = config.build(); match opt_matches.opt_str("l") { None => { if console_attached {