From b6ffcd9d4592b310ca02fc3e4f97aa64d0b74371 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Wed, 6 Sep 2023 08:13:29 +0200 Subject: [PATCH] fix logging to file --- lib/src/utils/logging.rs | 2 +- lib/src/utils/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/utils/logging.rs b/lib/src/utils/logging.rs index 7f582b0a..3614e865 100644 --- a/lib/src/utils/logging.rs +++ b/lib/src/utils/logging.rs @@ -199,7 +199,7 @@ pub fn init_logging( }; }; - if app_config.log_to_file && !app_config.path.exists() { + if app_config.log_to_file && app_config.path.exists() { let file_config = log_config .clone() .set_time_format_custom(format_description!( diff --git a/lib/src/utils/mod.rs b/lib/src/utils/mod.rs index f3feddf2..27fc9450 100644 --- a/lib/src/utils/mod.rs +++ b/lib/src/utils/mod.rs @@ -328,7 +328,7 @@ pub fn get_date(seek: bool, start: f64, get_next: bool) -> String { return (local - Duration::days(1)).format("%Y-%m-%d").to_string(); } - if start == 0.0 && get_next && get_sec() > 86398.0 { + if start == 0.0 && get_next && get_sec() > 86397.9 { return (local + Duration::days(1)).format("%Y-%m-%d").to_string(); }