Limit warnings to terminal during deck input.

With this, the tag limit of 10 is used from the very start of the run,
and not only after the deck has been read.
This commit is contained in:
Atgeirr Flø Rasmussen 2022-08-16 14:43:07 +02:00
parent 465623ce9f
commit 04180031e1

View File

@ -465,7 +465,11 @@ Opm::setupLogging(const int mpi_rank_,
if (mpi_rank_ == 0) { if (mpi_rank_ == 0) {
std::shared_ptr<Opm::StreamLog> streamLog = std::make_shared<Opm::StreamLog>(std::cout, Opm::Log::StdoutMessageTypes); std::shared_ptr<Opm::StreamLog> streamLog = std::make_shared<Opm::StreamLog>(std::cout, Opm::Log::StdoutMessageTypes);
Opm::OpmLog::addBackend(stdout_log_id, streamLog); Opm::OpmLog::addBackend(stdout_log_id, streamLog);
// Set a tag limit of 10 (no category limit). Will later in
// the run be replaced by calling setupMessageLimiter(), after
// the deck is read and the (possibly user-set) category
// limits are known.
streamLog->setMessageLimiter(std::make_shared<Opm::MessageLimiter>(10));
bool use_color_coding = OpmLog::stdoutIsTerminal(); bool use_color_coding = OpmLog::stdoutIsTerminal();
streamLog->setMessageFormatter(std::make_shared<Opm::SimpleMessageFormatter>(use_color_coding)); streamLog->setMessageFormatter(std::make_shared<Opm::SimpleMessageFormatter>(use_color_coding));
} }