on master help sign in
revert log truncation (#895) (#1130)
commited76cdf238b93846fa4edd8f926f6c05fc26b9fd authorKirawi <67773714+kirawi@users.noreply.github.com> dateThu 18 Nov 2021, 23:26 (5 years ago) parent2b7c086
1 file changed+1−6
helix-term/src/main.rs+1−6
helix-term/src/main.rs+1−6
@@ -16,11 +16,6 @@ fn setup_logging(logpath: PathBuf, verbosity: u64) -> Result<()> {
1616 };
1717
1818 // Separate file config so we can include year, month and day in file logs
19− let file = std::fs::OpenOptions::new()
20− .write(true)
21− .create(true)
22− .truncate(true)
23− .open(logpath)?;
2419 let file_config = fern::Dispatch::new()
2520 .format(|out, message, record| {
2621 out.finish(format_args!(
@@ -31,7 +26,7 @@ fn setup_logging(logpath: PathBuf, verbosity: u64) -> Result<()> {
3126 message
3227 ))
3328 })
34− .chain(file);
29+ .chain(fern::log_file(logpath)?);
3530
3631 base_config.chain(file_config).apply()?;
3732