aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorKirawi2021-10-23 12:52:18 +0000
committerGitHub2021-10-23 12:52:18 +0000
commit0cb5e0b2caba61bbcf6f57ce58506882766d5eea (patch)
treed87c92ab1fcf969be89847e69ff4b370dfb4f2e7 /helix-term
parent0f886af4b993c836bb2d522f6e036362593ff8b8 (diff)
log syntax highlighting init errors (#895)
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 180dacd1..2589a375 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -16,6 +16,11 @@ 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!(
@@ -26,7 +31,7 @@ fn setup_logging(logpath: PathBuf, verbosity: u64) -> Result<()> {
message
))
})
- .chain(fern::log_file(logpath)?);
+ .chain(file);
base_config.chain(file_config).apply()?;