mirror of
https://github.com/AxioDL/logvisor.git
synced 2025-06-22 22:43:32 +00:00
Always flush log file on close to prevent incomplete logs
This commit is contained in:
parent
9420e3007e
commit
6926b6a7c9
@ -760,6 +760,7 @@ struct FileLogger : public ILogger {
|
||||
}
|
||||
virtual void closeFile() {
|
||||
if (fp) {
|
||||
std::fflush(fp);
|
||||
std::fclose(fp);
|
||||
fp = nullptr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user