Skip to content

Commit

Permalink
revert log truncation (helix-editor#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirawi committed Nov 19, 2021
1 parent f2b4ff2 commit 8e2156f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions helix-term/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand All @@ -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()?;

Expand Down

0 comments on commit 8e2156f

Please sign in to comment.