mirror of https://github.com/AxioDL/logvisor.git
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() {
|
virtual void closeFile() {
|
||||||
if (fp) {
|
if (fp) {
|
||||||
|
std::fflush(fp);
|
||||||
std::fclose(fp);
|
std::fclose(fp);
|
||||||
fp = nullptr;
|
fp = nullptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue