mirror of
https://github.com/AxioDL/logvisor.git
synced 2025-12-08 21:17:44 +00:00
Always flush log file on close to prevent incomplete logs
This commit is contained in:
@@ -760,6 +760,7 @@ struct FileLogger : public ILogger {
|
||||
}
|
||||
virtual void closeFile() {
|
||||
if (fp) {
|
||||
std::fflush(fp);
|
||||
std::fclose(fp);
|
||||
fp = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user