mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #820 from qilicun/support-MESSAGES
support MESSAGES keyword.
This commit is contained in:
commit
3a6353a455
@ -141,10 +141,10 @@ namespace Opm
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
asImpl().setupOutput();
|
asImpl().setupOutput();
|
||||||
asImpl().setupLogging();
|
|
||||||
asImpl().readDeckInput();
|
asImpl().readDeckInput();
|
||||||
asImpl().setupGridAndProps();
|
asImpl().setupLogging();
|
||||||
asImpl().extractMessages();
|
asImpl().extractMessages();
|
||||||
|
asImpl().setupGridAndProps();
|
||||||
asImpl().runDiagnostics();
|
asImpl().runDiagnostics();
|
||||||
asImpl().setupState();
|
asImpl().setupState();
|
||||||
asImpl().writeInit();
|
asImpl().writeInit();
|
||||||
@ -423,8 +423,16 @@ namespace Opm
|
|||||||
OpmLog::addBackend( "STREAMLOG", streamLog);
|
OpmLog::addBackend( "STREAMLOG", streamLog);
|
||||||
std::shared_ptr<StreamLog> debugLog = std::make_shared<EclipsePRTLog>(debugFile, Log::DefaultMessageTypes, false, output_cout_);
|
std::shared_ptr<StreamLog> debugLog = std::make_shared<EclipsePRTLog>(debugFile, Log::DefaultMessageTypes, false, output_cout_);
|
||||||
OpmLog::addBackend( "DEBUGLOG" , debugLog);
|
OpmLog::addBackend( "DEBUGLOG" , debugLog);
|
||||||
|
const auto& msgLimits = eclipse_state_->getSchedule()->getMessageLimits();
|
||||||
|
const std::map<int64_t, int> limits = {{Log::MessageType::Note, msgLimits.getCommentPrintLimit(0)},
|
||||||
|
{Log::MessageType::Info, msgLimits.getMessagePrintLimit(0)},
|
||||||
|
{Log::MessageType::Warning, msgLimits.getWarningPrintLimit(0)},
|
||||||
|
{Log::MessageType::Error, msgLimits.getErrorPrintLimit(0)},
|
||||||
|
{Log::MessageType::Problem, msgLimits.getProblemPrintLimit(0)},
|
||||||
|
{Log::MessageType::Bug, msgLimits.getBugPrintLimit(0)}};
|
||||||
|
prtLog->setMessageLimiter(std::make_shared<MessageLimiter>());
|
||||||
prtLog->setMessageFormatter(std::make_shared<SimpleMessageFormatter>(false));
|
prtLog->setMessageFormatter(std::make_shared<SimpleMessageFormatter>(false));
|
||||||
streamLog->setMessageLimiter(std::make_shared<MessageLimiter>(10));
|
streamLog->setMessageLimiter(std::make_shared<MessageLimiter>(10, limits));
|
||||||
streamLog->setMessageFormatter(std::make_shared<SimpleMessageFormatter>(true));
|
streamLog->setMessageFormatter(std::make_shared<SimpleMessageFormatter>(true));
|
||||||
|
|
||||||
// Read parameters.
|
// Read parameters.
|
||||||
|
Loading…
Reference in New Issue
Block a user