From 8e2156fb16d2f8d9ab910d0024961124f5bbd04f Mon Sep 17 00:00:00 2001 From: Shafkath Shuhan Date: Thu, 18 Nov 2021 22:11:22 -0500 Subject: [PATCH] revert log truncation (#895) --- helix-term/src/main.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs index 6fa1ce67128f..881401304023 100644 --- a/helix-term/src/main.rs +++ b/helix-term/src/main.rs @@ -16,11 +16,6 @@ fn setup_logging(logpath: PathBuf, verbosity: u64) -> Result<()> { }; // Separate file config so we can include year, month and day in file logs - let file = std::fs::OpenOptions::new() - .write(true) - .create(true) - .truncate(true) - .open(logpath)?; let file_config = fern::Dispatch::new() .format(|out, message, record| { out.finish(format_args!( @@ -31,7 +26,7 @@ fn setup_logging(logpath: PathBuf, verbosity: u64) -> Result<()> { message )) }) - .chain(file); + .chain(fern::log_file(logpath)?); base_config.chain(file_config).apply()?;