diff --git a/include/spdlog/sinks/ostream_sink.h b/include/spdlog/sinks/ostream_sink.h index e7816a78..5649b0b8 100644 --- a/include/spdlog/sinks/ostream_sink.h +++ b/include/spdlog/sinks/ostream_sink.h @@ -32,7 +32,9 @@ protected: sink::formatter_->format(msg, formatted); ostream_.write(formatted.data(), static_cast(formatted.size())); if (force_flush_) + { ostream_.flush(); + } } void flush_() override