Skip to content

Commit

Permalink
fix: properly override log file
Browse files Browse the repository at this point in the history
overriding file requires both write *and* truncate operations
  • Loading branch information
owl-from-hogvarts committed May 9, 2024
1 parent 4d93bf8 commit 4a08986
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32,494 deletions.
1 change: 1 addition & 0 deletions cpu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn start() -> Result<(), Box<dyn Error>> {
let log_path = Path::new("cpu.log");
let log_output = OpenOptions::new()
.create(true)
.truncate(true)
.write(true)
.open(log_path)?;
let log_config = simplelog::ConfigBuilder::new()
Expand Down
Loading

0 comments on commit 4a08986

Please sign in to comment.