From 06d9373d4b6ec936859d4610063b7affbd931693 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 24 Sep 2022 23:55:38 +0300 Subject: [PATCH] log async --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c7e0da2..925a709 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,7 @@ macro_rules! handle_error { fn main() { let args = Cli::parse(); - Logger::try_with_str("info") + let _logger = Logger::try_with_str("info") .unwrap() .log_to_file( FileSpec::default().directory(std::env::current_exe().unwrap().parent().unwrap()), @@ -59,6 +59,7 @@ fn main() { .adaptive_format_for_stderr(AdaptiveFormat::Detailed) .print_message() .duplicate_to_stderr(Duplicate::Warn) + .write_mode(flexi_logger::WriteMode::Async) .start_with_specfile( std::env::current_exe() .unwrap()