Skip to content

Commit

Permalink
append logs if they exist, otherwise create
Browse files Browse the repository at this point in the history
  • Loading branch information
Freyert committed Sep 22, 2024
1 parent 1d4be7d commit bf0e0e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub fn initialize_panic_handler() {
}

fn setup_logger(log_path: &str) {
let log_file = Box::new(File::create(log_path).unwrap_or_else(|_| {
let log_file = Box::new(File::options().append(true).create(true).open(log_path).unwrap_or_else(|_| {
eprintln!("Failed to open log file: '{log_path}'");
std::process::exit(1);
}));
Expand Down

0 comments on commit bf0e0e2

Please sign in to comment.