From c045891c4ca88f797787086476bb32b265d3f613 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Sun, 29 Nov 2020 12:58:10 +0100 Subject: [PATCH] Use fmtlib for output message --- src/opm/parser/eclipse/Parser/Parser.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/opm/parser/eclipse/Parser/Parser.cpp b/src/opm/parser/eclipse/Parser/Parser.cpp index c956db93e..96f3ac396 100644 --- a/src/opm/parser/eclipse/Parser/Parser.cpp +++ b/src/opm/parser/eclipse/Parser/Parser.cpp @@ -924,13 +924,9 @@ bool parseState( ParserState& parserState, const Parser& parser ) { const auto& kwname = rawKeyword->getKeywordName(); const auto& parserKeyword = parser.getParserKeywordFromDeckName( kwname ); { - std::stringstream ss; - const auto& location = rawKeyword->location(); - ss << std::setw(5) << parserState.deck.size() - << " Reading " << std::setw(8) << std::left << rawKeyword->getKeywordName() - << " in " << location.filename << " line " << std::to_string(location.lineno); - OpmLog::info(ss.str()); + auto msg = fmt::format("{:5} Reading {:<8} in {} line {}", parserState.deck.size(), rawKeyword->getKeywordName(), location.filename, location.lineno); + OpmLog::info(msg); } try { if (rawKeyword->getKeywordName() == Opm::RawConsts::pyinput) {