Only setup message limiter if logger is actually there.

Needed for test_ecl and test_ecl_output.
This commit is contained in:
Markus Blatt 2020-08-18 19:28:53 +02:00
parent 2b557a42ff
commit 410ad3bc82

View File

@ -217,7 +217,10 @@ void readDeck(int rank, std::string& deckFilename, std::unique_ptr<Opm::Deck>& d
if (!schedule)
schedule = std::make_unique<Opm::Schedule>(*deck, *eclipseState, *parseContext, *errorGuard, python);
}
setupMessageLimiter(schedule->getMessageLimits(), "STDOUT_LOGGER");
if (Opm::OpmLog::hasBackend("STDOUT_LOGGER")) // loggers might not be set up!
{
setupMessageLimiter(schedule->getMessageLimits(), "STDOUT_LOGGER");
}
if (!summaryConfig)
summaryConfig = std::make_unique<Opm::SummaryConfig>(*deck, *schedule, eclipseState->getTableManager(), *parseContext, *errorGuard);
#if HAVE_MPI