mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2182 RFT: Add logging for debugging
This commit is contained in:
parent
8cfb983b15
commit
6fae55f07c
@ -18,6 +18,7 @@
|
||||
|
||||
#include "RifReaderEclipseRft.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
|
||||
#include "cafVecIjk.h"
|
||||
@ -46,9 +47,15 @@ void RifReaderEclipseRft::open()
|
||||
{
|
||||
if (m_fileName.empty()) return;
|
||||
|
||||
RiaLogging::info(QString("Opening file '%1'").arg(m_fileName.c_str()));
|
||||
|
||||
m_ecl_rft_file = ecl_rft_file_alloc_case(m_fileName.data());
|
||||
|
||||
if (m_ecl_rft_file == NULL) return;
|
||||
if (m_ecl_rft_file == NULL)
|
||||
{
|
||||
RiaLogging::warning(QString("Libecl could not find/open file '%'").arg(m_fileName.c_str()));
|
||||
return;
|
||||
}
|
||||
|
||||
int fileSize = ecl_rft_file_get_size(m_ecl_rft_file);
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "RimEclipseResultCase.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RifEclipseOutputFileTools.h"
|
||||
@ -219,10 +220,16 @@ bool RimEclipseResultCase::importGridAndResultMetaData(bool showTimeStepFilter)
|
||||
QString rftFile = fileSplitOnDot[0] + ".RFT";
|
||||
std::string rftFileStdString = rftFile.toStdString();
|
||||
|
||||
if (std::ifstream(rftFileStdString.c_str()))
|
||||
std::ifstream inputStream(rftFileStdString.c_str());
|
||||
if (!inputStream.fail())
|
||||
{
|
||||
RiaLogging::info(QString("File '%1' found, creating reader").arg(rftFileStdString.c_str()));
|
||||
m_readerEclipseRft = new RifReaderEclipseRft(rftFileStdString);
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning(QString("Could not find file '%1'").arg(rftFileStdString.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user