mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ERT-747: Renamed ParserLog -> Logger
This commit is contained in:
parent
d948777ea0
commit
78ba6760da
@ -105,26 +105,26 @@ try
|
|||||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||||
|
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParserLogPtr parserLog(new Opm::ParserLog());
|
Opm::LoggerPtr logger(new Opm::Logger());
|
||||||
Opm::DeckConstPtr deck;
|
Opm::DeckConstPtr deck;
|
||||||
std::shared_ptr<EclipseState> eclipseState;
|
std::shared_ptr<EclipseState> eclipseState;
|
||||||
try {
|
try {
|
||||||
deck = parser->parseFile(deck_filename, parserLog);
|
deck = parser->parseFile(deck_filename, logger);
|
||||||
Opm::checkDeck(deck, parserLog);
|
Opm::checkDeck(deck, logger);
|
||||||
eclipseState.reset(new Opm::EclipseState(deck, parserLog));
|
eclipseState.reset(new Opm::EclipseState(deck, logger));
|
||||||
}
|
}
|
||||||
catch (const std::invalid_argument& e) {
|
catch (const std::invalid_argument& e) {
|
||||||
if (parserLog->size() > 0) {
|
if (logger->size() > 0) {
|
||||||
std::cerr << "Issues found while parsing the deck file:\n";
|
std::cerr << "Issues found while parsing the deck file:\n";
|
||||||
parserLog->printAll(std::cerr);
|
logger->printAll(std::cerr);
|
||||||
}
|
}
|
||||||
std::cerr << "error while parsing the deck file: " << e.what() << "\n";
|
std::cerr << "error while parsing the deck file: " << e.what() << "\n";
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parserLog->size() > 0) {
|
if (logger->size() > 0) {
|
||||||
std::cerr << "Issues found while parsing the deck file:\n";
|
std::cerr << "Issues found while parsing the deck file:\n";
|
||||||
parserLog->printAll(std::cerr);
|
logger->printAll(std::cerr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grid init
|
// Grid init
|
||||||
|
@ -131,27 +131,27 @@ try
|
|||||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||||
|
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParserLogPtr parserLog(new Opm::ParserLog());
|
Opm::LoggerPtr logger(new Opm::Logger());
|
||||||
bool strict_parsing = param.getDefault("strict_parsing", true);
|
bool strict_parsing = param.getDefault("strict_parsing", true);
|
||||||
Opm::DeckConstPtr deck;
|
Opm::DeckConstPtr deck;
|
||||||
std::shared_ptr<EclipseState> eclipseState;
|
std::shared_ptr<EclipseState> eclipseState;
|
||||||
try {
|
try {
|
||||||
deck = parser->parseFile(deck_filename, parserLog);
|
deck = parser->parseFile(deck_filename, logger);
|
||||||
checkDeck(deck, parserLog);
|
checkDeck(deck, logger);
|
||||||
eclipseState.reset(new EclipseState(deck, parserLog));
|
eclipseState.reset(new EclipseState(deck, logger));
|
||||||
}
|
}
|
||||||
catch (const std::invalid_argument& e) {
|
catch (const std::invalid_argument& e) {
|
||||||
if (parserLog->size() > 0) {
|
if (logger->size() > 0) {
|
||||||
std::cerr << "Issues found while parsing the deck file:\n";
|
std::cerr << "Issues found while parsing the deck file:\n";
|
||||||
parserLog->printAll(std::cerr);
|
logger->printAll(std::cerr);
|
||||||
}
|
}
|
||||||
std::cerr << "error while parsing the deck file: " << e.what() << "\n";
|
std::cerr << "error while parsing the deck file: " << e.what() << "\n";
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parserLog->size() > 0) {
|
if (logger->size() > 0) {
|
||||||
std::cerr << "Issues found while parsing the deck file:\n";
|
std::cerr << "Issues found while parsing the deck file:\n";
|
||||||
parserLog->printAll(std::cerr);
|
logger->printAll(std::cerr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grid init
|
// Grid init
|
||||||
|
Loading…
Reference in New Issue
Block a user