diff --git a/opm/simulators/flow/LogOutputHelper.cpp b/opm/simulators/flow/LogOutputHelper.cpp index 326dce56b2..8188586ca9 100644 --- a/opm/simulators/flow/LogOutputHelper.cpp +++ b/opm/simulators/flow/LogOutputHelper.cpp @@ -617,9 +617,8 @@ outputInjectionReportRecord_(const std::vector& wellInj, wellInj[WellProdDataType::WellLocationi] >= 1; std::ostringstream ss; - - ss << std::right << std::fixed << std::setprecision(0) << ':' - << std::setw(8) << wellInjNames[WellInjDataType::WellName] << ':'; + ss << fmt::format(":{:<8}:", wellInjNames[WellInjDataType::WellName]); + ss << std::right << std::fixed << std::setprecision(0) << std::setw(8); if (! isWellRecord) { ss << std::setw(11) << "" << ':'; diff --git a/tests/test_LogOutputHelper.cpp b/tests/test_LogOutputHelper.cpp index d5f8d31ceb..9f2fb5ec1e 100644 --- a/tests/test_LogOutputHelper.cpp +++ b/tests/test_LogOutputHelper.cpp @@ -334,9 +334,9 @@ BOOST_FIXTURE_TEST_CASE(Injection, LogNoteFixture) : NAME : (I,J,K) : MODE : MODE : MODE : RATE : RATE : RATE : RES.VOL. : CON.PR.: BLK.PR.: : : : OIL : WAT : GAS : STB/DAY : STB/DAY : MSCF/DAY : RB/DAY : PSIA : PSIA : ============================================================================================================= -: 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: +: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: :--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------: )" };