Let OpmLog control output.

This commit is contained in:
Liu Ming
2016-05-10 13:51:10 +08:00
parent 431a21d632
commit f5a57b8a26
3 changed files with 2 additions and 10 deletions

View File

@@ -369,7 +369,9 @@ namespace Opm
ParserPtr parser(new Parser());
{
std::shared_ptr<EclipsePRTLog> prtLog = std::make_shared<EclipsePRTLog>(logFile_ , Log::DefaultMessageTypes);
std::shared_ptr<StreamLog> streamLog = std::make_shared<StreamLog>(std::cout, Log::DefaultMessageTypes);
OpmLog::addBackend( "ECLIPSEPRTLOG" , prtLog );
OpmLog::addBackend( "STREAMLOG", streamLog);
}
// Create Deck and EclipseState.
@@ -679,7 +681,6 @@ namespace Opm
if (output_cout_) {
std::string msg;
msg = "\n\n================ Starting main simulation loop ===============\n";
std::cout << msg << std::endl;
OpmLog::info(msg);
}
@@ -689,7 +690,6 @@ namespace Opm
std::ostringstream ss;
ss << "\n\n================ End of simulation ===============\n\n";
fullReport.reportFullyImplicit(ss);
std::cout << ss.str() << std::endl;
OpmLog::info(ss.str());
if (param_.anyUnused()) {
// This allows a user to catch typos and misunderstandings in the