[fix] log file needs to be opened create + append
This commit is contained in:
parent
a8ca38f4a4
commit
91ec9ab7ec
@ -35,7 +35,13 @@ fn print_delete_line(output: &mut StdoutLock) -> LogtimesResult {
|
||||
}
|
||||
|
||||
fn run() -> LogtimesResult {
|
||||
let mut log_file = args().nth(1).map(|f| File::create(f).unwrap());
|
||||
let mut log_file = args().nth(1).map(|f| {
|
||||
File::options()
|
||||
.create(true)
|
||||
.append(true)
|
||||
.open(f)
|
||||
.expect("Could not open log file")
|
||||
});
|
||||
|
||||
let out = stdout();
|
||||
let mut output = out.lock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user