diff --git a/fmt b/fmt index 002bb75..d141cdb 160000 --- a/fmt +++ b/fmt @@ -1 +1 @@ -Subproject commit 002bb759ffc2ba03c7167d22cb58291b1b933af4 +Subproject commit d141cdbeb0fb422a3fb7173b285fd38e0d1772dc diff --git a/fmtlog-inl.h b/fmtlog-inl.h index b698561..0d51b66 100644 --- a/fmtlog-inl.h +++ b/fmtlog-inl.h @@ -293,7 +293,10 @@ class fmtlogDetailT } void flushLogFile() { - if (outputFp) fwrite(membuf.data(), 1, membuf.size(), outputFp); + if (outputFp) { + fwrite(membuf.data(), 1, membuf.size(), outputFp); + if (!manageFp) fflush(outputFp); + } membuf.clear(); nextFlushTime = (std::numeric_limits::max)(); }