diff --git a/opm/simulators/flow/LogOutputHelper.cpp b/opm/simulators/flow/LogOutputHelper.cpp index 8188586ca9..201d924c9a 100644 --- a/opm/simulators/flow/LogOutputHelper.cpp +++ b/opm/simulators/flow/LogOutputHelper.cpp @@ -621,10 +621,12 @@ outputInjectionReportRecord_(const std::vector& wellInj, ss << std::right << std::fixed << std::setprecision(0) << std::setw(8); if (! isWellRecord) { - ss << std::setw(11) << "" << ':'; + ss << fmt::format("{:11}:", ""); } else { - ss << std::setw( 5) << wellInj[WellInjDataType::WellLocationi] << ',' - << std::setw( 5) << wellInj[WellInjDataType::WellLocationj] << ':'; + ss << fmt::format("{:>3},{:>3} {:>3}:", + wellInj[WellInjDataType::WellLocationi], + wellInj[WellInjDataType::WellLocationj], + ""); } ss << std::setw( 6) << wellInjNames[WellInjDataType::CTRLModeOil] << ':' diff --git a/tests/test_LogOutputHelper.cpp b/tests/test_LogOutputHelper.cpp index 9f2fb5ec1e..87ab76bec7 100644 --- a/tests/test_LogOutputHelper.cpp +++ b/tests/test_LogOutputHelper.cpp @@ -336,7 +336,7 @@ BOOST_FIXTURE_TEST_CASE(Injection, LogNoteFixture) ============================================================================================================= :FIELD : : : : : 1.0: 2.0: 3.0: 4.0: : : :G1 : : : : : 5.0: 6.0: 7.0: 8.0: : : -:INJ : 1, 1: : : GRAT: 9.0: 10.0: 11.0: 12.0: 13.0: 14.0: +:INJ : 1, 1 : : : GRAT: 9.0: 10.0: 11.0: 12.0: 13.0: 14.0: :--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------: )" };