aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorKirawi2021-11-19 04:26:39 +0000
committerGitHub2021-11-19 04:26:39 +0000
commited76cdf238b93846fa4edd8f926f6c05fc26b9fd (patch)
tree06eb645e2bcc4d71a1e450113b48b9260a5e8513 /helix-term/src
parent2b7c0866538676de4e5738d82e450163ff733104 (diff)
revert log truncation (#895) (#1130)
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/main.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 6fa1ce67..88140130 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()?;