From aa604aad9e5d457bf5c7559de58dfe6643487cb5 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Mon, 12 Jan 2015 21:35:36 +0100 Subject: [PATCH] Add ostream.flush() call in the StreamLog --- opm/parser/eclipse/OpmLog/StreamLog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opm/parser/eclipse/OpmLog/StreamLog.cpp b/opm/parser/eclipse/OpmLog/StreamLog.cpp index 4ee513d6b..16c3cc1ce 100644 --- a/opm/parser/eclipse/OpmLog/StreamLog.cpp +++ b/opm/parser/eclipse/OpmLog/StreamLog.cpp @@ -45,8 +45,12 @@ void StreamLog::close() { } void StreamLog::addMessage(int64_t messageType , const std::string& message) { - if (includeMessage( messageType )) + if (includeMessage( messageType )) { (*m_ostream) << message << std::endl; + + if (m_ofstream.is_open()) + m_ofstream.flush(); + } }