mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 22:27:55 -05:00
#13126 RiaLogging: Use std::string_view instead of QString for logging
This commit is contained in:
1 parent
4957bf5a8b
commit
5ffcb69acc
231 files changed
+1082
-893
No files matched your search
@@ -38,6 +38,7 @@
|
||||
#include "RiaPreferencesSumo.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
#include "RiaProjectModifier.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
#include "RiaSocketServer.h"
|
||||
#include "RiaTextStringTools.h"
|
||||
@@ -390,7 +391,7 @@ void RiaApplication::setThreadCount() const
|
||||
|
||||
if ( threadCount.has_value() )
|
||||
{
|
||||
RiaLogging::info( QString( "Setting number of threads to %1 from %2" ).arg( threadCount.value() ).arg( source ) );
|
||||
RiaLogging::info( std::format( "Setting number of threads to {} from {}", threadCount.value(), source ) );
|
||||
|
||||
RiaOpenMPTools::setMaxThreads( threadCount.value() );
|
||||
}
|
||||
@@ -529,13 +530,13 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
|
||||
onProjectBeingOpened();
|
||||
|
||||
RiaLogging::info( QString( "Starting to open project file : '%1'" ).arg( projectFileName ) );
|
||||
RiaLogging::info( std::format( "Starting to open project file : '{}'", projectFileName ) );
|
||||
|
||||
// Create a absolute path file name, as this is required for update of file references in the project modifier object
|
||||
QString fullPathProjectFileName = caf::Utils::absoluteFileName( projectFileName );
|
||||
if ( !caf::Utils::fileExists( fullPathProjectFileName ) )
|
||||
{
|
||||
RiaLogging::info( QString( "File does not exist : '%1'" ).arg( fullPathProjectFileName ) );
|
||||
RiaLogging::info( std::format( "File does not exist : '{}'", fullPathProjectFileName ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -543,7 +544,7 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
std::vector<QString> deprecationMessages = m_project->readFile( defaultDeprecations() );
|
||||
for ( const QString& deprecationMessage : deprecationMessages )
|
||||
{
|
||||
RiaLogging::info( deprecationMessage );
|
||||
RiaLogging::info( deprecationMessage.toStdString() );
|
||||
}
|
||||
|
||||
m_project->updatesAfterProjectFileIsRead();
|
||||
@@ -909,7 +910,7 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
{
|
||||
auto ensembleTask = progress.task( QString( "Loading Summary Ensemble '%1'" ).arg( ensemble->name() ), stepSize );
|
||||
ensemble->loadDataAndUpdate();
|
||||
RiaLogging::info( QString( "Loaded ensemble : '%1'" ).arg( ensemble->name() ) );
|
||||
RiaLogging::info( std::format( "Loaded ensemble : '{}'", ensemble->name() ) );
|
||||
}
|
||||
sumMainCollection->updateEnsembleNames();
|
||||
|
||||
@@ -961,7 +962,7 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::info( logText );
|
||||
RiaLogging::info( logText.toStdString() );
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1124,7 +1125,7 @@ bool RiaApplication::openOdbCaseFromFile( const QString& fileName, bool applyTim
|
||||
{
|
||||
if ( gmcase->gridFileName() == fileName )
|
||||
{
|
||||
RiaLogging::warning( "File has already been opened. Cannot open the file twice! - " + fileName );
|
||||
RiaLogging::warning( "File has already been opened. Cannot open the file twice! - " + fileName.toStdString() );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaPreferencesGrid.h"
|
||||
#include "RiaProjectModifier.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaSocketServer.h"
|
||||
#include "RiaVersionInfo.h"
|
||||
|
||||
@@ -183,7 +184,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( gsl::n
|
||||
QString errMsg;
|
||||
if ( !RiaApplication::generateCode( outputFile, &errMsg ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Error: %1" ).arg( errMsg ) );
|
||||
RiaLogging::error( std::format( "Error: {}", errMsg ) );
|
||||
return RiaApplication::ApplicationStatus::EXIT_WITH_ERROR;
|
||||
}
|
||||
|
||||
@@ -438,7 +439,7 @@ void RiaConsoleApplication::invokeProcessEvents( QEventLoop::ProcessEventsFlags
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaConsoleApplication::onProjectOpeningError( const QString& errMsg )
|
||||
{
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "RiaPreferencesGrid.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
#include "RiaProjectModifier.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
#include "RiaSocketServer.h"
|
||||
#include "RiaVersionInfo.h"
|
||||
@@ -581,7 +582,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
|
||||
QString errMsg;
|
||||
if ( !RiaApplication::generateCode( outputFile, &errMsg ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Error: %1" ).arg( errMsg ) );
|
||||
RiaLogging::error( std::format( "Error: {}", errMsg ) );
|
||||
return RiaApplication::ApplicationStatus::KEEP_GOING;
|
||||
}
|
||||
|
||||
|
||||
@@ -1105,12 +1105,12 @@ void RiaPreferences::importPreferenceValuesFromFile( const QString& fileName )
|
||||
this->readObjectFromXmlString( fileContent, caf::PdmDefaultObjectFactory::instance() );
|
||||
}
|
||||
auto txt = "Imported preferences from " + fileName;
|
||||
RiaLogging::info( txt );
|
||||
RiaLogging::info( txt.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
auto txt = QString( "Unable to open file: " ) + fileName;
|
||||
RiaLogging::error( txt );
|
||||
RiaLogging::error( txt.toStdString() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1129,11 +1129,11 @@ void RiaPreferences::exportPreferenceValuesToFile( const QString& fileName )
|
||||
file.close();
|
||||
|
||||
QString txt = "Exported preferences to " + fileName;
|
||||
RiaLogging::info( txt );
|
||||
RiaLogging::info( txt.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
auto txt = QString( "Unable to open file: " ) + fileName;
|
||||
RiaLogging::error( txt );
|
||||
RiaLogging::error( txt.toStdString() );
|
||||
}
|
||||
}
|
||||
@@ -310,13 +310,13 @@ void RiaPreferencesGrid::setGridModelReaderOverride( const std::string& readerNa
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning( QString::fromStdString( "Unknown EGRID reader type specified on command line: " + readerName ) );
|
||||
RiaLogging::warning( "Unknown EGRID reader type specified on command line: " + readerName );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( readerType != RiaDefines::GridModelReader::NOT_SET )
|
||||
{
|
||||
RiaLogging::info( QString::fromStdString( "Using EGRID reader: " + readerName ) );
|
||||
RiaLogging::info( "Using EGRID reader: " + readerName );
|
||||
}
|
||||
|
||||
m_gridModelReaderOverride = readerType;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaVersionInfo.h"
|
||||
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
@@ -105,7 +106,7 @@ void RiaPreferencesOpenTelemetry::setData( const std::map<QString, QString>& key
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning( QString( "Unknown OpenTelemetry config key: '%1'" ).arg( key ) );
|
||||
RiaLogging::warning( std::format( "Unknown OpenTelemetry config key: '{}'", key ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaImageFileCompare.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaImageTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaLogging.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaQStringFormatter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaProjectModifier.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaRegressionTest.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaImportEclipseCaseTools.h
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "RiaConnectorTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaOAuthHttpServerReplyHandler.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDesktopServices>
|
||||
@@ -90,14 +91,14 @@ RiaCloudConnector::RiaCloudConnector( QObject* parent,
|
||||
|
||||
if ( validOption )
|
||||
{
|
||||
RiaLogging::info( QString( "Setting SSL protocol to %1 (from RESINSIGHT_SSL_PROTOCOL)" ).arg( sslProtocolEnv ) );
|
||||
RiaLogging::info( std::format( "Setting SSL protocol to {} (from RESINSIGHT_SSL_PROTOCOL)", sslProtocolEnv ) );
|
||||
QSslConfiguration sslConfig = QSslConfiguration::defaultConfiguration();
|
||||
sslConfig.setProtocol( protocol );
|
||||
QSslConfiguration::setDefaultConfiguration( sslConfig );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning( QString( "Invalid RESINSIGHT_SSL_PROTOCOL value: %1" ).arg( sslProtocolEnv ) );
|
||||
RiaLogging::warning( std::format( "Invalid RESINSIGHT_SSL_PROTOCOL value: {}", sslProtocolEnv ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,20 +106,20 @@ RiaCloudConnector::RiaCloudConnector( QObject* parent,
|
||||
m_networkAccessManager = new QNetworkAccessManager( this );
|
||||
m_authCodeFlow->setNetworkAccessManager( m_networkAccessManager );
|
||||
|
||||
RiaLogging::debug( "SSL BUILD VERSION: " + QSslSocket::sslLibraryBuildVersionString() );
|
||||
RiaLogging::debug( "SSL VERSION STRING: " + QSslSocket::sslLibraryVersionString() );
|
||||
RiaLogging::debug( "SSL BUILD VERSION: " + QSslSocket::sslLibraryBuildVersionString().toStdString() );
|
||||
RiaLogging::debug( "SSL VERSION STRING: " + QSslSocket::sslLibraryVersionString().toStdString() );
|
||||
|
||||
RiaLogging::debug( "Cloud config:" );
|
||||
RiaLogging::debug( " server: '" + server + "'" );
|
||||
RiaLogging::debug( " authority: '" + authority + "'" );
|
||||
RiaLogging::debug( " scopes: '" + scopes + "'" );
|
||||
RiaLogging::debug( " client id: '" + clientId + "'" );
|
||||
RiaLogging::debug( std::format( " server: '{}'", server ) );
|
||||
RiaLogging::debug( std::format( " authority: '{}'", authority ) );
|
||||
RiaLogging::debug( std::format( " scopes: '{}'", scopes ) );
|
||||
RiaLogging::debug( std::format( " client id: '{}'", clientId ) );
|
||||
|
||||
connect( m_authCodeFlow,
|
||||
&QOAuth2AuthorizationCodeFlow::authorizeWithBrowser,
|
||||
[]( QUrl url )
|
||||
{
|
||||
RiaLogging::info( "Authorize with url: " + url.toString() );
|
||||
RiaLogging::info( "Authorize with url: " + url.toString().toStdString() );
|
||||
QUrlQuery query( url );
|
||||
url.setQuery( query );
|
||||
QDesktopServices::openUrl( url );
|
||||
@@ -136,7 +137,7 @@ RiaCloudConnector::RiaCloudConnector( QObject* parent,
|
||||
|
||||
auto replyHandler = new RiaOAuthHttpServerReplyHandler( port, this );
|
||||
m_authCodeFlow->setReplyHandler( replyHandler );
|
||||
RiaLogging::debug( "Server callback: " + replyHandler->callback() );
|
||||
RiaLogging::debug( "Server callback: " + replyHandler->callback().toStdString() );
|
||||
|
||||
connect( m_authCodeFlow, SIGNAL( granted() ), this, SLOT( accessGranted() ) );
|
||||
|
||||
@@ -173,7 +174,7 @@ RiaCloudConnector::RiaCloudConnector( QObject* parent,
|
||||
this,
|
||||
[&]( const QDateTime& expiration )
|
||||
{
|
||||
RiaLogging::debug( QString( "Access token expiration changed: %1" ).arg( expiration.toString() ) );
|
||||
RiaLogging::debug( std::format( "Access token expiration changed: {}", expiration.toString() ) );
|
||||
exportTokenToFile();
|
||||
} );
|
||||
}
|
||||
@@ -209,7 +210,7 @@ void RiaCloudConnector::accessGranted()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaCloudConnector::errorReceived( const QString& error, const QString& errorDescription, const QUrl& uri )
|
||||
{
|
||||
RiaLogging::debug( "Cloud Error Received: " + error + ". Description: " + errorDescription );
|
||||
RiaLogging::debug( std::format( "Cloud Error Received: {}. Description: {}", error, errorDescription ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -220,7 +221,7 @@ void RiaCloudConnector::authorizationCallbackReceived( const QVariantMap& data )
|
||||
RiaLogging::debug( "Authorization callback received:" );
|
||||
for ( const auto& [key, value] : data.toStdMap() )
|
||||
{
|
||||
RiaLogging::debug( " Key: " + key + " Value: " + value.toString() );
|
||||
RiaLogging::debug( std::format( " Key: {} Value: {}", key, value.toString() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "RiaPreferencesOpenTelemetry.h"
|
||||
#include "RiaPreferencesOsdu.h"
|
||||
#include "RiaPreferencesSumo.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
@@ -188,7 +189,7 @@ void RiaConnectorTools::readCloudConfigFiles( RiaPreferences* preferences )
|
||||
auto keyValuePairs = RiaConnectorTools::readKeyValuePairs( filePath );
|
||||
if ( !keyValuePairs.empty() )
|
||||
{
|
||||
RiaLogging::debug( QString( "Imported OSDU configuration from : '%1'" ).arg( filePath ) );
|
||||
RiaLogging::debug( std::format( "Imported OSDU configuration from : '{}'", filePath ) );
|
||||
preferences->osduPreferences()->setData( keyValuePairs, filePath );
|
||||
break;
|
||||
}
|
||||
@@ -200,7 +201,7 @@ void RiaConnectorTools::readCloudConfigFiles( RiaPreferences* preferences )
|
||||
auto keyValuePairs = RiaConnectorTools::readKeyValuePairs( filePath );
|
||||
if ( !keyValuePairs.empty() )
|
||||
{
|
||||
RiaLogging::debug( QString( "Imported SUMO configuration from : '%1'" ).arg( filePath ) );
|
||||
RiaLogging::debug( std::format( "Imported SUMO configuration from : '{}'", filePath ) );
|
||||
preferences->sumoPreferences()->setData( keyValuePairs, filePath );
|
||||
break;
|
||||
}
|
||||
@@ -212,7 +213,7 @@ void RiaConnectorTools::readCloudConfigFiles( RiaPreferences* preferences )
|
||||
auto keyValuePairs = RiaConnectorTools::readKeyValuePairs( filePath );
|
||||
if ( !keyValuePairs.empty() )
|
||||
{
|
||||
RiaLogging::debug( QString( "Imported OpenTelemetry configuration from : '%1'" ).arg( filePath ) );
|
||||
RiaLogging::debug( std::format( "Imported OpenTelemetry configuration from : '{}'", filePath ) );
|
||||
RiaPreferencesOpenTelemetry::current()->setData( keyValuePairs, filePath );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "RiaCloudDefines.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaOsduDefines.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
@@ -120,7 +121,7 @@ void RiaOsduConnector::requestFieldsByName( const QString& server, const QString
|
||||
{
|
||||
QString errorMessage =
|
||||
QString( "Download failed for fields by name (%1). Error: %2" ).arg( fieldName ).arg( reply->errorString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -156,7 +157,7 @@ void RiaOsduConnector::requestWellboresByFieldId( const QString& server, const Q
|
||||
{
|
||||
QString errorMessage =
|
||||
QString( "Request failed for wellbores for field (%1). Error: %2" ).arg( fieldId ).arg( reply->errorString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -210,7 +211,7 @@ void RiaOsduConnector::requestWellLogsByWellboreId( const QString& server,
|
||||
{
|
||||
QString errorMessage =
|
||||
QString( "Request failed for well logs by wellbore (%1). Error: %2" ).arg( wellboreId ).arg( reply->errorString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -249,7 +250,7 @@ void RiaOsduConnector::requestWellboreTrajectoryByWellboreId( const QString& ser
|
||||
{
|
||||
QString errorMessage =
|
||||
QString( "Request failed for well trajectory by wellbore (%1). Error: %2" ).arg( wellboreId ).arg( reply->errorString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -340,7 +341,7 @@ void RiaOsduConnector::parseFields( QNetworkReply* reply )
|
||||
m_fields.push_back( OsduField{ id, kind, fieldName } );
|
||||
}
|
||||
|
||||
RiaLogging::debug( QString( "Found %1 fields." ).arg( m_fields.size() ) );
|
||||
RiaLogging::debug( std::format( "Found {} fields.", m_fields.size() ) );
|
||||
}
|
||||
|
||||
emit fieldsFinished();
|
||||
@@ -389,7 +390,7 @@ void RiaOsduConnector::parseWellboresByFieldId( QNetworkReply* reply, const QStr
|
||||
|
||||
if ( std::isinf( datumElevation ) )
|
||||
{
|
||||
RiaLogging::warning( QString( "Missing datum elevation for well bore '%1'. Id: %2" ).arg( name ).arg( id ) );
|
||||
RiaLogging::warning( std::format( "Missing datum elevation for well bore '{}'. Id: {}", name, id ) );
|
||||
datumElevation = 0.0;
|
||||
}
|
||||
|
||||
@@ -401,7 +402,7 @@ void RiaOsduConnector::parseWellboresByFieldId( QNetworkReply* reply, const QStr
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( "Failed to download wellbores for field with id " + fieldId + ": " + reply->errorString() );
|
||||
RiaLogging::error( std::format( "Failed to download wellbores for field with id {}: {}", fieldId, reply->errorString() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,7 +481,7 @@ void RiaOsduConnector::parseWellLogs( QNetworkReply* reply, const QString& wellb
|
||||
double samplingStop = dataObj["SamplingStop"].toDouble( std::numeric_limits<double>::infinity() );
|
||||
|
||||
QJsonArray curvesArray = dataObj["Curves"].toArray();
|
||||
RiaLogging::debug( QString( "Curves for '%1':" ).arg( id ) );
|
||||
RiaLogging::debug( std::format( "Curves for '{}':", id ) );
|
||||
|
||||
std::vector<OsduWellLogChannel> channels;
|
||||
for ( const QJsonValue& curve : curvesArray )
|
||||
@@ -495,8 +496,7 @@ void RiaOsduConnector::parseWellLogs( QNetworkReply* reply, const QString& wellb
|
||||
QString unit = curve["CurveUnit"].toString();
|
||||
QString depthUnit = curve["DepthUnit"].toString();
|
||||
|
||||
RiaLogging::debug(
|
||||
QString( "%1: '%2' (%3 - %4)" ).arg( curveId ).arg( curveDescription ).arg( curveTopDepth ).arg( curveBaseDepth ) );
|
||||
RiaLogging::debug( std::format( "{}: '{}' ({} - {})", curveId, curveDescription, curveTopDepth, curveBaseDepth ) );
|
||||
channels.push_back( OsduWellLogChannel{ .id = curveId,
|
||||
.mnemonic = mnemonic,
|
||||
.description = curveDescription,
|
||||
@@ -632,7 +632,7 @@ std::vector<OsduWellboreTrajectory> RiaOsduConnector::wellboreTrajectories( cons
|
||||
void RiaOsduConnector::requestWellboreTrajectoryParquetDataById( const QString& wellboreTrajectoryId )
|
||||
{
|
||||
QString url = constructWellboreTrajectoriesDownloadUrl( m_server, wellboreTrajectoryId );
|
||||
RiaLogging::debug( "Wellbore trajectory URL: " + url );
|
||||
RiaLogging::debug( "Wellbore trajectory URL: " + url.toStdString() );
|
||||
requestParquetDataByUrl( url, wellboreTrajectoryId );
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ void RiaOsduConnector::requestWellboreTrajectoryParquetDataById( const QString&
|
||||
void RiaOsduConnector::requestWellLogParquetDataById( const QString& wellLogId )
|
||||
{
|
||||
QString url = constructWellLogDownloadUrl( m_server, wellLogId );
|
||||
RiaLogging::debug( "Well log URL: " + url );
|
||||
RiaLogging::debug( "Well log URL: " + url.toStdString() );
|
||||
|
||||
requestParquetDataByUrl( url, wellLogId );
|
||||
}
|
||||
@@ -661,7 +661,7 @@ void RiaOsduConnector::requestParquetDataByUrl( const QString& url, const QStrin
|
||||
std::pair<QByteArray, QString> RiaOsduConnector::requestWellboreTrajectoryParquetDataByIdBlocking( const QString& wellboreTrajectoryId )
|
||||
{
|
||||
QString url = constructWellboreTrajectoriesDownloadUrl( m_server, wellboreTrajectoryId );
|
||||
RiaLogging::debug( "Wellbore trajectory URL: " + url );
|
||||
RiaLogging::debug( "Wellbore trajectory URL: " + url.toStdString() );
|
||||
|
||||
return requestParquetDataByUrlBlocking( url, wellboreTrajectoryId );
|
||||
}
|
||||
@@ -672,7 +672,7 @@ std::pair<QByteArray, QString> RiaOsduConnector::requestWellboreTrajectoryParque
|
||||
std::pair<QByteArray, QString> RiaOsduConnector::requestWellLogParquetDataByIdBlocking( const QString& wellLogId )
|
||||
{
|
||||
QString url = constructWellLogDownloadUrl( m_server, wellLogId );
|
||||
RiaLogging::debug( "Well log URL: " + url );
|
||||
RiaLogging::debug( "Well log URL: " + url.toStdString() );
|
||||
|
||||
return requestParquetDataByUrlBlocking( url, wellLogId );
|
||||
}
|
||||
@@ -698,7 +698,7 @@ std::pair<QByteArray, QString> RiaOsduConnector::requestParquetDataByUrlBlocking
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaOsduConnector::requestParquetData( const QString& url, const QString& dataPartitionId, const QString& token, const QString& id )
|
||||
{
|
||||
RiaLogging::info( "Requesting download of parquet from: " + url );
|
||||
RiaLogging::info( "Requesting download of parquet from: " + url.toStdString() );
|
||||
|
||||
auto reply = makeDownloadRequest( url, dataPartitionId, token, RiaCloudDefines::contentTypeParquet() );
|
||||
m_repliesMutex.lock();
|
||||
@@ -712,13 +712,13 @@ void RiaOsduConnector::requestParquetData( const QString& url, const QString& da
|
||||
if ( reply->error() == QNetworkReply::NoError )
|
||||
{
|
||||
QByteArray contents = reply->readAll();
|
||||
RiaLogging::info( QString( "Download succeeded: %1 bytes." ).arg( contents.length() ) );
|
||||
RiaLogging::info( std::format( "Download succeeded: {} bytes.", contents.length() ) );
|
||||
emit parquetDownloadFinished( contents, "", id );
|
||||
}
|
||||
else
|
||||
{
|
||||
QString errorMessage = "Request failed: " + url + " failed." + reply->errorString();
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
emit parquetDownloadFinished( QByteArray(), errorMessage, id );
|
||||
}
|
||||
} );
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaOAuthHttpServerReplyHandler.h"
|
||||
#include "RiaOsduDefines.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include <QEventLoop>
|
||||
#include <QJsonArray>
|
||||
@@ -284,11 +285,11 @@ void RiaSumoConnector::parseEnsembleNames( QNetworkReply* reply, const SumoCaseI
|
||||
m_ensembleNames.push_back( { caseId, ensembleName } );
|
||||
}
|
||||
|
||||
RiaLogging::debug( QString( "Ensemble count : %1" ).arg( m_ensembleNames.size() ) );
|
||||
RiaLogging::debug( std::format( "Ensemble count : {}", m_ensembleNames.size() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Request ensemble names failed: : '%s'" ).arg( reply->errorString() ) );
|
||||
RiaLogging::error( std::format( "Request ensemble names failed: : '%s'", reply->errorString() ) );
|
||||
}
|
||||
|
||||
emit ensembleNamesFinished();
|
||||
@@ -524,7 +525,7 @@ void RiaSumoConnector::requestParametersBlobIdForEnsemble( const SumoCaseId& cas
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Request parameters failed: : '%s'" ).arg( reply->errorString() ) );
|
||||
RiaLogging::error( std::format( "Request parameters failed: : '%s'", reply->errorString() ) );
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -624,13 +625,13 @@ void RiaSumoConnector::requestBlobDownload( const QString& blobId )
|
||||
else
|
||||
{
|
||||
QString errorMessage = "Not able to parse and interpret valid redirect Url";
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QString errorMessage = "Download failed: " + url + " failed." + reply->errorString();
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
@@ -640,7 +641,7 @@ void RiaSumoConnector::requestBlobDownload( const QString& blobId )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSumoConnector::requestBlobByRedirectUri( const QString& blobId, const QString& redirectUri )
|
||||
{
|
||||
RiaLogging::debug( QString( "Requesting blob. Id: %1 Redirect URL: %2" ).arg( blobId ).arg( redirectUri ) );
|
||||
RiaLogging::debug( std::format( "Requesting blob. Id: {} Redirect URL: {}", blobId, redirectUri ) );
|
||||
|
||||
requestTokenBlocking();
|
||||
|
||||
@@ -658,7 +659,7 @@ void RiaSumoConnector::requestBlobByRedirectUri( const QString& blobId, const QS
|
||||
auto contents = reply->readAll();
|
||||
|
||||
QString msg = "Received data from : " + redirectUri;
|
||||
RiaLogging::info( msg );
|
||||
RiaLogging::info( msg.toStdString() );
|
||||
|
||||
parquetDownloadComplete( blobId, contents, redirectUri );
|
||||
|
||||
@@ -667,7 +668,7 @@ void RiaSumoConnector::requestBlobByRedirectUri( const QString& blobId, const QS
|
||||
else
|
||||
{
|
||||
QString errorMessage = "Download failed: " + redirectUri + " failed." + reply->errorString();
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
|
||||
emit parquetDownloadFinished( {}, redirectUri );
|
||||
}
|
||||
@@ -797,12 +798,12 @@ void RiaSumoConnector::parseAssets( QNetworkReply* reply )
|
||||
|
||||
for ( auto a : m_assets )
|
||||
{
|
||||
RiaLogging::info( QString( "Asset: %1" ).arg( a.name ) );
|
||||
RiaLogging::info( std::format( "Asset: {}", a.name ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Request assets failed: : '%s'" ).arg( reply->errorString() ) );
|
||||
RiaLogging::error( std::format( "Request assets failed: : '%s'", reply->errorString() ) );
|
||||
}
|
||||
|
||||
emit assetsFinished();
|
||||
@@ -838,11 +839,11 @@ void RiaSumoConnector::parseCases( QNetworkReply* reply )
|
||||
m_cases.push_back( SumoCase{ SumoCaseId( id ), kind, fieldName } );
|
||||
}
|
||||
|
||||
RiaLogging::debug( QString( "Case count : %1" ).arg( m_cases.size() ) );
|
||||
RiaLogging::debug( std::format( "Case count : {}", m_cases.size() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Request cases failed: : '%s'" ).arg( reply->errorString() ) );
|
||||
RiaLogging::error( std::format( "Request cases failed: : '%s'", reply->errorString() ) );
|
||||
}
|
||||
|
||||
emit casesFinished();
|
||||
@@ -875,7 +876,7 @@ void RiaSumoConnector::parseVectorNames( QNetworkReply* reply, const SumoCaseId&
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Request vector names failed: : '%s'" ).arg( reply->errorString() ) );
|
||||
RiaLogging::error( std::format( "Request vector names failed: : '%s'", reply->errorString() ) );
|
||||
}
|
||||
|
||||
emit vectorNamesFinished();
|
||||
@@ -973,7 +974,7 @@ QNetworkReply* RiaSumoConnector::makeDownloadRequest( const QString& url, const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSumoConnector::requestParquetData( const QString& url, const QString& token )
|
||||
{
|
||||
RiaLogging::info( "Requesting download of parquet from: " + url );
|
||||
RiaLogging::info( "Requesting download of parquet from: " + url.toStdString() );
|
||||
|
||||
auto reply = makeDownloadRequest( url, token, RiaCloudDefines::contentTypeJson() );
|
||||
connect( reply,
|
||||
@@ -983,13 +984,13 @@ void RiaSumoConnector::requestParquetData( const QString& url, const QString& to
|
||||
if ( reply->error() == QNetworkReply::NoError )
|
||||
{
|
||||
QByteArray contents = reply->readAll();
|
||||
RiaLogging::info( QString( "Download succeeded: %1 bytes." ).arg( contents.length() ) );
|
||||
RiaLogging::info( std::format( "Download succeeded: {} bytes.", contents.length() ) );
|
||||
emit parquetDownloadFinished( contents, "" );
|
||||
}
|
||||
else
|
||||
{
|
||||
QString errorMessage = "Download failed: " + url + " failed." + reply->errorString();
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
emit parquetDownloadFinished( QByteArray(), errorMessage );
|
||||
}
|
||||
} );
|
||||
|
||||
@@ -64,7 +64,7 @@ std::vector<RimSummaryCase*> createSummaryCasesFromFiles( const QStringList& fil
|
||||
if ( fileSelector.foundErrors() )
|
||||
{
|
||||
QString errorMessage = fileSelector.createCombinedErrorMessage();
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -216,7 +216,7 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList& fil
|
||||
if ( selector.foundErrors() )
|
||||
{
|
||||
QString errorMessage = selector.createCombinedErrorMessage();
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
|
||||
project->activeOilField()->completionTemplateCollection()->setDefaultUnitSystemBasedOnLoadedCases();
|
||||
|
||||
@@ -166,11 +166,11 @@ void RiaDefaultConsoleLogger::writeToConsole( const std::string& str )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaLogging::setLastMessage( const QString& message )
|
||||
void RiaLogging::setLastMessage( std::string_view message )
|
||||
{
|
||||
#pragma omp critical( critical_section_logging )
|
||||
{
|
||||
sm_lastMessage = message;
|
||||
sm_lastMessage.assign( message );
|
||||
sm_lastMessageTime = std::chrono::high_resolution_clock::now();
|
||||
}
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void RiaLogging::setLastMessage( const QString& message )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaLogging::isSameMessage( const QString& message )
|
||||
bool RiaLogging::isSameMessage( std::string_view message )
|
||||
{
|
||||
bool isSame = false;
|
||||
|
||||
@@ -199,6 +199,15 @@ bool RiaLogging::isSameMessage( const QString& message )
|
||||
return isSame;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaLogging::isKeywordEnabled( std::string_view keyword )
|
||||
{
|
||||
return RiaPreferencesSystem::current()->isLoggingActivatedForKeyword(
|
||||
QString::fromUtf8( keyword.data(), static_cast<qsizetype>( keyword.size() ) ) );
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
//
|
||||
@@ -206,7 +215,7 @@ bool RiaLogging::isSameMessage( const QString& message )
|
||||
//==================================================================================================
|
||||
|
||||
std::vector<std::unique_ptr<RiaLogger>> RiaLogging::sm_logger;
|
||||
QString RiaLogging::sm_lastMessage;
|
||||
std::string RiaLogging::sm_lastMessage;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> RiaLogging::sm_lastMessageTime;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -264,84 +273,76 @@ std::optional<RILogLevel> RiaLogging::parseLogLevelString( const QString& logLev
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaLogging::error( const QString& message, const QString logKeyword )
|
||||
void RiaLogging::error( std::string_view message, std::string_view logKeyword )
|
||||
{
|
||||
if ( !RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( logKeyword ) ) return;
|
||||
|
||||
if ( !isKeywordEnabled( logKeyword ) ) return;
|
||||
if ( isSameMessage( message ) ) return;
|
||||
|
||||
const std::string buf{ message };
|
||||
for ( const auto& logger : sm_logger )
|
||||
{
|
||||
if ( logger && logger->level() >= int( RILogLevel::RI_LL_ERROR ) )
|
||||
{
|
||||
#pragma omp critical( critical_section_logging )
|
||||
logger->error( message.toLatin1().constData() );
|
||||
logger->error( buf.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
setLastMessage( message );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaLogging::warning( const QString& message, const QString logKeyword )
|
||||
void RiaLogging::warning( std::string_view message, std::string_view logKeyword )
|
||||
{
|
||||
if ( !RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( logKeyword ) ) return;
|
||||
|
||||
if ( !isKeywordEnabled( logKeyword ) ) return;
|
||||
if ( isSameMessage( message ) ) return;
|
||||
|
||||
const std::string buf{ message };
|
||||
for ( const auto& logger : sm_logger )
|
||||
{
|
||||
if ( logger && logger->level() >= int( RILogLevel::RI_LL_WARNING ) )
|
||||
{
|
||||
#pragma omp critical( critical_section_logging )
|
||||
logger->warning( message.toLatin1().constData() );
|
||||
logger->warning( buf.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
setLastMessage( message );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaLogging::info( const QString& message, const QString logKeyword )
|
||||
void RiaLogging::info( std::string_view message, std::string_view logKeyword )
|
||||
{
|
||||
if ( !RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( logKeyword ) ) return;
|
||||
|
||||
if ( !isKeywordEnabled( logKeyword ) ) return;
|
||||
if ( isSameMessage( message ) ) return;
|
||||
|
||||
const std::string buf{ message };
|
||||
for ( const auto& logger : sm_logger )
|
||||
{
|
||||
if ( logger && logger->level() >= int( RILogLevel::RI_LL_INFO ) )
|
||||
{
|
||||
#pragma omp critical( critical_section_logging )
|
||||
logger->info( message.toLatin1().constData() );
|
||||
logger->info( buf.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
setLastMessage( message );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaLogging::debug( const QString& message, const QString logKeyword )
|
||||
void RiaLogging::debug( std::string_view message, std::string_view logKeyword )
|
||||
{
|
||||
if ( !RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( logKeyword ) ) return;
|
||||
|
||||
if ( !isKeywordEnabled( logKeyword ) ) return;
|
||||
if ( isSameMessage( message ) ) return;
|
||||
|
||||
const std::string buf{ message };
|
||||
for ( const auto& logger : sm_logger )
|
||||
{
|
||||
if ( logger && logger->level() >= int( RILogLevel::RI_LL_DEBUG ) )
|
||||
{
|
||||
#pragma omp critical( critical_section_logging )
|
||||
logger->debug( message.toLatin1().constData() );
|
||||
logger->debug( buf.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
setLastMessage( message );
|
||||
}
|
||||
|
||||
|
||||
@@ -68,21 +68,22 @@ public:
|
||||
static RILogLevel logLevelBasedOnPreferences();
|
||||
static std::optional<RILogLevel> parseLogLevelString( const QString& logLevelString );
|
||||
|
||||
static void error( const QString& message, const QString logKeyword = "" );
|
||||
static void warning( const QString& message, const QString logKeyword = "" );
|
||||
static void info( const QString& message, const QString logKeyword = "" );
|
||||
static void debug( const QString& message, const QString logKeyword = "" );
|
||||
static void error( std::string_view message, std::string_view logKeyword = "" );
|
||||
static void warning( std::string_view message, std::string_view logKeyword = "" );
|
||||
static void info( std::string_view message, std::string_view logKeyword = "" );
|
||||
static void debug( std::string_view message, std::string_view logKeyword = "" );
|
||||
|
||||
static std::chrono::time_point<std::chrono::high_resolution_clock> currentTime();
|
||||
static void logElapsedTime( std::string_view message, const std::chrono::time_point<std::chrono::high_resolution_clock>& startTime );
|
||||
|
||||
private:
|
||||
static void setLastMessage( const QString& message );
|
||||
static bool isSameMessage( const QString& message );
|
||||
static void setLastMessage( std::string_view message );
|
||||
static bool isSameMessage( std::string_view message );
|
||||
static bool isKeywordEnabled( std::string_view keyword );
|
||||
|
||||
private:
|
||||
static std::vector<std::unique_ptr<RiaLogger>> sm_logger;
|
||||
static QString sm_lastMessage;
|
||||
static std::string sm_lastMessage;
|
||||
static std::chrono::time_point<std::chrono::high_resolution_clock> sm_lastMessageTime;
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ bool createTableIfNeeded()
|
||||
"content TEXT)" ) )
|
||||
{
|
||||
QString txt = "Error creating table:" + query.lastError().text();
|
||||
RiaLogging::error( txt );
|
||||
RiaLogging::error( txt.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ bool insertContent( const QString& content )
|
||||
if ( !query.exec() )
|
||||
{
|
||||
QString txt = "Error saving file content to database:" + query.lastError().text();
|
||||
RiaLogging::error( txt );
|
||||
RiaLogging::error( txt.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ bool deleteOldRecords( int maximumRecordCount )
|
||||
QSqlQuery countQuery( "SELECT COUNT(*) FROM file_versions" );
|
||||
if ( !countQuery.exec() || !countQuery.next() )
|
||||
{
|
||||
RiaLogging::error( "Error counting records: " + countQuery.lastError().text() );
|
||||
RiaLogging::error( "Error counting records: " + countQuery.lastError().text().toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ bool deleteOldRecords( int maximumRecordCount )
|
||||
if ( !query.exec() )
|
||||
{
|
||||
QString txt = "Error deleting old records:" + query.lastError().text();
|
||||
RiaLogging::error( txt );
|
||||
RiaLogging::error( txt.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ bool appendTextToDatabase( const QString& databaseFilePath, int maximumRecordCou
|
||||
if ( !db.open() )
|
||||
{
|
||||
QString txt = "Error opening database:" + db.lastError().text();
|
||||
RiaLogging::error( txt );
|
||||
RiaLogging::error( txt.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2026- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <format>
|
||||
#include <string_view>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
|
||||
// std::formatter specialization for QString. Include this header in any
|
||||
// translation unit that calls std::format with QString arguments.
|
||||
//
|
||||
// QString is encoded as UTF-8 before being formatted as a string_view; the
|
||||
// QByteArray holding the encoded bytes lives for the duration of the format()
|
||||
// call, which writes synchronously to the output iterator.
|
||||
template <>
|
||||
struct std::formatter<QString> : std::formatter<std::string_view>
|
||||
{
|
||||
auto format( const QString& value, std::format_context& ctx ) const
|
||||
{
|
||||
const QByteArray bytes = value.toUtf8();
|
||||
return std::formatter<std::string_view>::format( std::string_view{ bytes.constData(), static_cast<size_t>( bytes.size() ) }, ctx );
|
||||
}
|
||||
};
|
||||
@@ -54,7 +54,7 @@ namespace internal
|
||||
QFile file( filename );
|
||||
if ( !file.open( QIODevice::WriteOnly ) )
|
||||
{
|
||||
RiaLogging::error( "Couldn't open file : " + filename );
|
||||
RiaLogging::error( "Couldn't open file : " + filename.toStdString() );
|
||||
return;
|
||||
}
|
||||
file.write( jsonDoc.toJson() );
|
||||
@@ -68,7 +68,7 @@ namespace internal
|
||||
QFile file( filename );
|
||||
if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
||||
{
|
||||
RiaLogging::error( "Couldn't open file : " + filename );
|
||||
RiaLogging::error( "Couldn't open file : " + filename.toStdString() );
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace internal
|
||||
|
||||
if ( !jsonDoc.isObject() )
|
||||
{
|
||||
RiaLogging::error( "Invalid JSON format in : " + filename );
|
||||
RiaLogging::error( "Invalid JSON format in : " + filename.toStdString() );
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "RiaPlotWindowRedrawScheduler.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaProjectModifier.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaRegressionTest.h"
|
||||
#include "RiaTextFileCompare.h"
|
||||
#include "RiaTextStringTools.h"
|
||||
@@ -85,7 +86,7 @@ void logInfoTextWithTimeInSeconds( const QElapsedTimer& time, const QString& msg
|
||||
|
||||
QString timeText = QString( "(%1 s) " ).arg( timeRunning, 0, 'f', 1 );
|
||||
|
||||
RiaLogging::info( timeText + msg );
|
||||
RiaLogging::info( std::format( "{}{}", timeText, msg ) );
|
||||
QApplication::processEvents();
|
||||
}
|
||||
|
||||
@@ -189,7 +190,7 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
}
|
||||
|
||||
RiaLogging::info( "--------------------------------------------------" );
|
||||
RiaLogging::info( QTime::currentTime().toString() + ": Launching regression tests" );
|
||||
RiaLogging::info( std::format( "{}: Launching regression tests", QTime::currentTime().toString() ) );
|
||||
RiaLogging::info( "--------------------------------------------------" );
|
||||
|
||||
QElapsedTimer timeStamp;
|
||||
@@ -209,7 +210,7 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
if ( !testPrefsFile.isEmpty() )
|
||||
{
|
||||
RiaPreferences::current()->importPreferenceValuesFromFile( testPrefsFile );
|
||||
RiaLogging::info( "Loaded test-specific preferences from: " + testPrefsFile );
|
||||
RiaLogging::info( "Loaded test-specific preferences from: " + testPrefsFile.toStdString() );
|
||||
}
|
||||
|
||||
bool anyCommandFilesExecuted = findAndExecuteCommandFiles( testCaseFolder, regressionTestConfig, htmlReportFileName );
|
||||
@@ -282,8 +283,9 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( "Could not find a regression test file named : " + testCaseFolder.absolutePath() + "/" +
|
||||
regTestProjectName + ".rsp" );
|
||||
RiaLogging::error( std::format( "Could not find a regression test file named : {}/{}.rsp",
|
||||
testCaseFolder.absolutePath(),
|
||||
regTestProjectName ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,7 +322,7 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
{
|
||||
auto timeText = QString( "(%1 s) " ).arg( testDuration, 5, 'f', 1 );
|
||||
auto logInfo = QString( "%1 %2 %3 %4" ).arg( timeText ).arg( beforeMemory ).arg( afterMemory ).arg( name );
|
||||
RiaLogging::info( logInfo );
|
||||
RiaLogging::info( logInfo.toStdString() );
|
||||
}
|
||||
|
||||
// Invoke git diff
|
||||
@@ -415,7 +417,7 @@ bool RiaRegressionTestRunner::findAndExecuteCommandFiles( const QDir&
|
||||
QFile file( commandFile );
|
||||
if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
||||
{
|
||||
RiaLogging::error( "Failed to open command file : " + commandFile );
|
||||
RiaLogging::error( "Failed to open command file : " + commandFile.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -470,13 +470,13 @@ std::set<int> RiaStdStringTools::valuesFromRangeSelection( const std::string& s
|
||||
{
|
||||
QString str = QString( "Failed to convert text string \" %1 \" to list of integers : " ).arg( QString::fromStdString( s ) ) +
|
||||
QString::fromStdString( e.what() );
|
||||
RiaLogging::error( str );
|
||||
RiaLogging::error( str.toStdString() );
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
QString str =
|
||||
QString( "Failed to convert text string \" %1 \" to list of integers : Caught unknown exception" ).arg( QString::fromStdString( s ) );
|
||||
RiaLogging::error( str );
|
||||
RiaLogging::error( str.toStdString() );
|
||||
}
|
||||
|
||||
return {};
|
||||
@@ -565,13 +565,13 @@ std::set<int> RiaStdStringTools::valuesFromRangeSelection( const std::string& s,
|
||||
{
|
||||
QString str = QString( "Failed to convert text string \" %1 \" to list of integers : " ).arg( QString::fromStdString( s ) ) +
|
||||
QString::fromStdString( e.what() );
|
||||
RiaLogging::error( str );
|
||||
RiaLogging::error( str.toStdString() );
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
QString str =
|
||||
QString( "Failed to convert text string \" %1 \" to list of integers : Caught unknown exception" ).arg( QString::fromStdString( s ) );
|
||||
RiaLogging::error( str );
|
||||
RiaLogging::error( str.toStdString() );
|
||||
}
|
||||
|
||||
return {};
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "RiaToCafLogging.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// Static member definitions
|
||||
@@ -55,7 +56,7 @@ void RiaToCafLoggingBridge::setLevel( int logLevel )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaToCafLoggingBridge::error( const QString& message )
|
||||
{
|
||||
RiaLogging::error( QString( "CAF: %1" ).arg( message ) );
|
||||
RiaLogging::error( std::format( "CAF: {}", message ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -63,7 +64,7 @@ void RiaToCafLoggingBridge::error( const QString& message )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaToCafLoggingBridge::warning( const QString& message )
|
||||
{
|
||||
RiaLogging::warning( QString( "CAF: %1" ).arg( message ) );
|
||||
RiaLogging::warning( std::format( "CAF: {}", message ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -71,7 +72,7 @@ void RiaToCafLoggingBridge::warning( const QString& message )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaToCafLoggingBridge::info( const QString& message )
|
||||
{
|
||||
RiaLogging::info( QString( "CAF: %1" ).arg( message ) );
|
||||
RiaLogging::info( std::format( "CAF: {}", message ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -79,7 +80,7 @@ void RiaToCafLoggingBridge::info( const QString& message )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaToCafLoggingBridge::debug( const QString& message )
|
||||
{
|
||||
RiaLogging::debug( QString( "CAF: %1" ).arg( message ) );
|
||||
RiaLogging::debug( std::format( "CAF: {}", message ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -57,7 +57,7 @@ RifEclipseSummaryAddress RiaSummaryAddressModifier::replaceTokenForCategory( con
|
||||
"for region text : %1" )
|
||||
.arg( QString::fromStdString( token ) );
|
||||
|
||||
RiaLogging::error( errorText );
|
||||
RiaLogging::error( errorText.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -73,7 +73,7 @@ RifEclipseSummaryAddress RiaSummaryAddressModifier::replaceTokenForCategory( con
|
||||
"for region text : %1" )
|
||||
.arg( QString::fromStdString( token ) );
|
||||
|
||||
RiaLogging::error( errorText );
|
||||
RiaLogging::error( errorText.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,7 +89,7 @@ RifEclipseSummaryAddress RiaSummaryAddressModifier::replaceTokenForCategory( con
|
||||
"for aquifer text : %1" )
|
||||
.arg( QString::fromStdString( token ) );
|
||||
|
||||
RiaLogging::error( errorText );
|
||||
RiaLogging::error( errorText.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "Summary/RiaSummaryAddressAnalyzer.h"
|
||||
#include "Summary/RiaSummaryTools.h"
|
||||
|
||||
@@ -57,7 +58,7 @@ RimSummaryMultiPlot* RicSummaryPlotTemplateTools::createMultiPlotFromTemplateFil
|
||||
QFile importFile( fileName );
|
||||
if ( !importFile.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Create Plot from Template : Could not open the file: %1" ).arg( fileName ) );
|
||||
RiaLogging::error( std::format( "Create Plot from Template : Could not open the file: {}", fileName ) );
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Summary/RiaSummaryStringTools.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaStdStringTools.h"
|
||||
#include "RiaTextStringTools.h"
|
||||
#include "Summary/RiaSummaryTools.h"
|
||||
@@ -65,7 +66,7 @@ void RiaSummaryStringTools::splitAddressFiltersInGridAndSummary( RimSummaryCase*
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning( "No summary or restart vectors matched \"" + address + "\"" );
|
||||
RiaLogging::warning( std::format( "No summary or restart vectors matched \"{}\"", address ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesOpenTelemetry.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RifJsonEncodeDecode.h"
|
||||
|
||||
#include <QCryptographicHash>
|
||||
@@ -417,7 +418,7 @@ void RiaOpenTelemetryManager::reportCrash( int signalCode, const std::stacktrace
|
||||
}
|
||||
}
|
||||
|
||||
RiaLogging::error( QString( "Crash reported to OpenTelemetry (signal: %1)" ).arg( signalCode ) );
|
||||
RiaLogging::error( std::format( "Crash reported to OpenTelemetry (signal: {})", signalCode ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -597,7 +598,7 @@ bool RiaOpenTelemetryManager::createExporter()
|
||||
}
|
||||
|
||||
// Using Application Insights REST API for telemetry
|
||||
RiaLogging::info( QString( "Application Insights REST API configured for production environment" ) );
|
||||
RiaLogging::info( "Application Insights REST API configured for production environment" );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -832,7 +833,7 @@ void RiaOpenTelemetryManager::handleError( TelemetryError error, const QString&
|
||||
m_errorCallback( error, context );
|
||||
}
|
||||
|
||||
RiaLogging::warning( QString( "OpenTelemetry error: %1" ).arg( context ) );
|
||||
RiaLogging::warning( std::format( "OpenTelemetry error: {}", context ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -73,6 +73,6 @@ caf::PdmScriptResponse RicfCloneView::execute()
|
||||
}
|
||||
|
||||
QString error = QString( "cloneView: Could not clone view with id %1" ).arg( m_viewId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "RicfCommandFileExecutor.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RicfCloseProject.h"
|
||||
#include "RicfCommandObject.h"
|
||||
@@ -72,11 +73,11 @@ void RicfCommandFileExecutor::executeCommands( QTextStream& stream )
|
||||
{
|
||||
if ( message.first == caf::PdmScriptIOMessages::MESSAGE_WARNING )
|
||||
{
|
||||
RiaLogging::warning( QString( "Command file parsing warning: %1" ).arg( message.second ) );
|
||||
RiaLogging::warning( std::format( "Command file parsing warning: {}", message.second ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Command file parsing error: %1" ).arg( message.second ) );
|
||||
RiaLogging::error( std::format( "Command file parsing error: {}", message.second ) );
|
||||
|
||||
for ( auto& command : fileCommands )
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ caf::PdmScriptResponse RicfComputeCaseGroupStatistics::execute()
|
||||
QString warning = QString( "computeCaseGroupStatistics: Found case with ID %1, but it is not a "
|
||||
"statistics case, cannot compute statistics." )
|
||||
.arg( caseId );
|
||||
RiaLogging::warning( warning );
|
||||
RiaLogging::warning( warning.toStdString() );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
}
|
||||
foundCase = true;
|
||||
@@ -96,7 +96,7 @@ caf::PdmScriptResponse RicfComputeCaseGroupStatistics::execute()
|
||||
{
|
||||
QString warning = QString( "computeCaseGroupStatistics: Could not find statistics case with ID %1." ).arg( caseId );
|
||||
|
||||
RiaLogging::warning( warning );
|
||||
RiaLogging::warning( warning.toStdString() );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ caf::PdmScriptResponse RicfCreateLgrForCompletions::execute()
|
||||
if ( !wellsNotFound.empty() )
|
||||
{
|
||||
QString error = QString( "createLgrForCompletions: These well paths were not found: " ) + wellsNotFound.join( ", " );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ caf::PdmScriptResponse RicfCreateLgrForCompletions::execute()
|
||||
if ( wellPaths.empty() )
|
||||
{
|
||||
QString error( "No well paths found" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ caf::PdmScriptResponse RicfCreateLgrForCompletions::execute()
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
QString error( QString( "createLgrForCompletions: Could not find case with ID %1" ).arg( m_caseId() ) );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ caf::PdmScriptResponse RicfCreateLgrForCompletions::execute()
|
||||
QString warning( "createLgrForCompletions: No LGRs created for some wells due to existing intersecting "
|
||||
"LGR(s).Affected wells : " +
|
||||
wellsList );
|
||||
RiaLogging::warning( warning );
|
||||
RiaLogging::warning( warning.toStdString() );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
}
|
||||
return response;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaWellNameComparer.h"
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
@@ -94,7 +95,7 @@ caf::PdmScriptResponse RicfCreateMultipleFractures::execute()
|
||||
if ( !wellsNotFound.empty() )
|
||||
{
|
||||
QString error = QString( "createMultipleFractures: These well paths were not found: %1" ).arg( wellsNotFound.join( ", " ) );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
}
|
||||
@@ -102,28 +103,28 @@ caf::PdmScriptResponse RicfCreateMultipleFractures::execute()
|
||||
if ( !gridCase )
|
||||
{
|
||||
QString error = QString( "createMultipleFractures: Could not find case with ID %1" ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
if ( !fractureTemplate )
|
||||
{
|
||||
QString error = QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
if ( wellPaths.empty() )
|
||||
{
|
||||
QString error( "createMultipleFractures: No wellpaths found" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
if ( !validateArguments() )
|
||||
{
|
||||
QString error( "createMultipleFractures: Mandatory argument(s) missing" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -181,6 +182,6 @@ RimFractureTemplate* RicfCreateMultipleFractures::fractureTemplateFromId( int te
|
||||
if ( t->id() == templateId ) return t;
|
||||
}
|
||||
|
||||
RiaLogging::error( QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
|
||||
RiaLogging::error( std::format( "createMultipleFractures: Could not find fracture template with ID {}", templateId ) );
|
||||
return nullptr;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ caf::PdmScriptResponse RicfCreateSaturationPressurePlots::execute()
|
||||
if ( caseIds.empty() )
|
||||
{
|
||||
QString error( "createSaturationPressurePlots: No cases found" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ caf::PdmScriptResponse RicfCreateSaturationPressurePlots::execute()
|
||||
if ( !project )
|
||||
{
|
||||
QString error( "No project loaded" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,6 @@ caf::PdmScriptResponse RicfCreateView::execute()
|
||||
}
|
||||
|
||||
QString error = QString( "createView: Could not create view for case id %1" ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@@ -92,7 +92,7 @@ caf::PdmScriptResponse RicfCreateWellBoreStabilityPlotFeature::execute()
|
||||
{
|
||||
QString error =
|
||||
QString( "The well path %1 has no geometry. Cannot create a Well Bore Stability Plot" ).arg( chosenWellPath->name() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -104,6 +104,6 @@ caf::PdmScriptResponse RicfCreateWellBoreStabilityPlotFeature::execute()
|
||||
}
|
||||
|
||||
QString error = QString( "createWellBoreStabilityPlot: Could not find GeoMech case with id %1" ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@@ -61,7 +61,7 @@ caf::PdmScriptResponse RicfExportFlowCharacteristics::execute()
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
QString error = QString( "exportFlowCharacteristics: Could not find case with ID %1." ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
if ( !wellsNotFound.empty() )
|
||||
{
|
||||
QString error( QString( "exportLgrForCompletions: These well paths were not found: " ) + wellsNotFound.join( ", " ) );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
if ( wellPaths.empty() )
|
||||
{
|
||||
QString error( "exportLgrForCompletions: Could not find any well paths" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
QString error( QString( "exportLgrForCompletions: Could not find case with ID %1" ).arg( m_caseId() ) );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
{
|
||||
auto wellsList = wellsIntersectingOtherLgrs.join( ", " );
|
||||
QString warning( "exportLgrForCompletions: No export for some wells due to existing intersecting LGR(s).Affected wells : " + wellsList );
|
||||
RiaLogging::warning( warning );
|
||||
RiaLogging::warning( warning.toStdString() );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
}
|
||||
return response;
|
||||
|
||||
@@ -66,7 +66,7 @@ caf::PdmScriptResponse RicfExportMsw::execute()
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
QString error = QString( "exportMsw: Could not find case with ID %1." ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ caf::PdmScriptResponse RicfExportMsw::execute()
|
||||
if ( !wellPath )
|
||||
{
|
||||
QString error = QString( "exportMsw: Could not find well path with name %1" ).arg( m_wellPathName() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -45,13 +45,13 @@ caf::PdmScriptResponse RicfExportMultiCaseSnapshots::execute()
|
||||
if ( !app )
|
||||
{
|
||||
QString error( "exportMultiCaseSnapshots: Requires GUI Application" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
if ( m_gridListFile().isNull() )
|
||||
{
|
||||
QString error( "exportMultiCaseSnapshots: Required parameter gridListFile." );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ caf::PdmScriptResponse RicfExportMultiCaseSnapshots::execute()
|
||||
{
|
||||
QString error( "exportMultiCaseSnapshots: 'openProject' must be called before 'exportMultiCaseSnapshots' to "
|
||||
"specify project file to replace cases in." );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ caf::PdmScriptResponse RicfExportProperty::execute()
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
QString error = QString( "exportProperty: Could not find case with ID %1" ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ caf::PdmScriptResponse RicfExportProperty::execute()
|
||||
if ( !eclipseCase->openReservoirCase() )
|
||||
{
|
||||
QString error = QString( "exportProperty: Could not find eclipseCaseData with ID %1" ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ caf::PdmScriptResponse RicfExportProperty::execute()
|
||||
if ( !cellResultsData->ensureKnownResultLoaded( RigEclipseResultAddress( m_propertyName ) ) )
|
||||
{
|
||||
QString error = QString( "exportProperty: Could not find result property : %1" ).arg( m_propertyName() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ caf::PdmScriptResponse RicfExportPropertyInViews::execute()
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
QString error( QString( "exportProperty: Could not find case with ID %1" ).arg( m_caseId() ) );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ caf::PdmScriptResponse RicfExportPropertyInViews::execute()
|
||||
.arg( m_caseId() )
|
||||
.arg( view->currentTimeStep() )
|
||||
.arg( propertyName );
|
||||
RiaLogging::warning( warning );
|
||||
RiaLogging::warning( warning.toStdString() );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
if ( !RiaGuiApplication::isRunning() )
|
||||
{
|
||||
QString error( "RicfExportSnapshot: Command cannot run without a GUI" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ caf::PdmScriptResponse RicfExportVisibleCells::execute()
|
||||
if ( m_caseId < 0 || ( m_viewName().isEmpty() && m_viewId() < 0 ) )
|
||||
{
|
||||
QString error( "exportVisibleCells: CaseId or view name or view id not specified" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
RimEclipseView* eclipseView = nullptr;
|
||||
@@ -98,7 +98,7 @@ caf::PdmScriptResponse RicfExportVisibleCells::execute()
|
||||
.arg( m_viewId() )
|
||||
.arg( m_viewName() )
|
||||
.arg( m_caseId() ) );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ caf::PdmScriptResponse RicfExportWellPathCompletions::execute()
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
QString error = QString( "exportWellPathCompletions: Could not find case with ID %1" ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
exportSettings.caseToApply = eclipseCase;
|
||||
@@ -175,7 +175,7 @@ caf::PdmScriptResponse RicfExportWellPathCompletions::execute()
|
||||
else
|
||||
{
|
||||
QString warning = QString( "exportWellPathCompletions: Could not find well path with name %1" ).arg( wellPathName );
|
||||
RiaLogging::warning( warning );
|
||||
RiaLogging::warning( warning.toStdString() );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ caf::PdmScriptResponse RicfExportWellPaths::execute()
|
||||
if ( !wellsNotFound.empty() )
|
||||
{
|
||||
QString error( QString( "exportWellPaths: These well paths were not found: " ) + wellsNotFound.join( ", " ) );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ caf::PdmScriptResponse RicfExportWellPaths::execute()
|
||||
if ( wellPaths.empty() )
|
||||
{
|
||||
QString error( "No well paths found" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ caf::PdmScriptResponse RicfLoadCase::execute()
|
||||
if ( fileOpenMetaData.createdCaseIds.empty() )
|
||||
{
|
||||
QString error = QString( "loadCase: Unable to load case from %1" ).arg( absolutePath );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ caf::PdmScriptResponse RicfOpenProject::execute()
|
||||
if ( !ok )
|
||||
{
|
||||
QString errMsg = QString( "openProject: Unable to open project at %1" ).arg( m_path() );
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, errMsg );
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ caf::PdmScriptResponse RicfSingleCaseReplace::execute()
|
||||
if ( lastProjectPath.isNull() )
|
||||
{
|
||||
QString errMsg( "replaceCase: The project must be saved as a file before calling 'replaceCase'." );
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, errMsg );
|
||||
}
|
||||
projectPath = lastProjectPath;
|
||||
@@ -98,7 +98,7 @@ caf::PdmScriptResponse RicfSingleCaseReplace::execute()
|
||||
if ( !RiaApplication::instance()->loadProject( projectPath, RiaApplication::ProjectLoadAction::PLA_NONE, projectModifier.p() ) )
|
||||
{
|
||||
QString errMsg( "Could not reload project" );
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, errMsg );
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ caf::PdmScriptResponse RicfMultiCaseReplace::execute()
|
||||
if ( m_caseIdToGridFileNameMap.empty() )
|
||||
{
|
||||
QString errMsg( "replaceCaseImpl: No replacements available." );
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, errMsg );
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ caf::PdmScriptResponse RicfMultiCaseReplace::execute()
|
||||
{
|
||||
QString errMsg( "replaceCase: 'openProject' must be called before 'replaceCase' to specify project file to "
|
||||
"replace case in." );
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, errMsg );
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ caf::PdmScriptResponse RicfMultiCaseReplace::execute()
|
||||
if ( !RiaApplication::instance()->loadProject( lastProjectPath, RiaApplication::ProjectLoadAction::PLA_NONE, projectModifier.p() ) )
|
||||
{
|
||||
QString errMsg( "Could not reload project" );
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, errMsg );
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ caf::PdmScriptResponse RicfReplaceSourceCases::execute()
|
||||
if ( m_gridListFile().isNull() )
|
||||
{
|
||||
QString error( "replaceSourceCases: Required parameter gridListFile." );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ caf::PdmScriptResponse RicfReplaceSourceCases::execute()
|
||||
{
|
||||
QString error( "replaceSourceCases: 'openProject' must be called before 'replaceSourceCases' to specify "
|
||||
"project file to replace cases in." );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ caf::PdmScriptResponse RicfReplaceSourceCases::execute()
|
||||
projectModifier.p() ) )
|
||||
{
|
||||
QString error( "Could not reload project" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
return caf::PdmScriptResponse();
|
||||
|
||||
@@ -81,7 +81,7 @@ caf::PdmScriptResponse RicfRunOctaveScript::execute()
|
||||
if ( !ok )
|
||||
{
|
||||
QString error = QString( "runOctaveScript: Could not execute script %1" ).arg( m_path() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -51,7 +51,7 @@ caf::PdmScriptResponse RicfScaleFractureTemplate::execute()
|
||||
if ( m_id < 0 )
|
||||
{
|
||||
QString error( "scaleFractureTemplate: Fracture template id not specified" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ caf::PdmScriptResponse RicfScaleFractureTemplate::execute()
|
||||
if ( !project )
|
||||
{
|
||||
QString error( "scaleFractureTemplate: Project not found" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ caf::PdmScriptResponse RicfScaleFractureTemplate::execute()
|
||||
if ( !templ )
|
||||
{
|
||||
QString error = QString( "scaleFractureTemplate: Fracture template not found. Id=%1" ).arg( m_id() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ caf::PdmScriptResponse RicfSetExportFolder::execute()
|
||||
if ( !dir.exists( m_path ) )
|
||||
{
|
||||
QString error = QString( "Could not create folder : %1" ).arg( m_path );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ caf::PdmScriptResponse RicfSetFractureContainment::execute()
|
||||
if ( m_id < 0 || m_topLayer < 0 || m_baseLayer < 0 )
|
||||
{
|
||||
QString error( "setFractureContainment: Required argument missing" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ caf::PdmScriptResponse RicfSetFractureContainment::execute()
|
||||
if ( !project )
|
||||
{
|
||||
QString error( "setFractureContainment: Project not found" );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ caf::PdmScriptResponse RicfSetFractureContainment::execute()
|
||||
if ( !templ )
|
||||
{
|
||||
QString error = QString( "setFractureContainment: Fracture template not found. Id=%1" ).arg( m_id() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@ caf::PdmScriptResponse RicfSetStartDir::execute()
|
||||
if ( !directory.exists() )
|
||||
{
|
||||
QString error = QString( "Path does not exist: %1" ).arg( m_path );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
if ( !directory.isReadable() )
|
||||
{
|
||||
QString error = QString( "Path does not exist: %1" ).arg( m_path );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ caf::PdmScriptResponse RicfSetTimeStep::execute()
|
||||
if ( !foundCase )
|
||||
{
|
||||
QString error = QString( "setTimeStep: Could not find case with ID %1" ).arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ caf::PdmScriptResponse RicfSetTimeStep::execute()
|
||||
.arg( m_timeStepIndex() )
|
||||
.arg( maxTimeStep )
|
||||
.arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
RiaLogging::error( error.toStdString() );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ void SimpleDialog::onShowContentParquetClicked()
|
||||
|
||||
// TODO: show content using parquet reader
|
||||
auto tableText = RifArrowTools::readFirstRowsOfTable( content );
|
||||
RiaLogging::info( tableText );
|
||||
RiaLogging::info( tableText.toStdString() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -225,7 +225,7 @@ void SimpleDialog::onRealizationsClicked()
|
||||
auto ids = m_sumoConnector->realizationIds();
|
||||
for ( const auto& id : ids )
|
||||
{
|
||||
RiaLogging::info( id );
|
||||
RiaLogging::info( id.toStdString() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ bool SimpleDialog::isTokenValid()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void SimpleDialog::onTokenReady( const QString& token )
|
||||
{
|
||||
RiaLogging::info( "Token ready: " + token );
|
||||
RiaLogging::info( "Token ready: " + token.toStdString() );
|
||||
}
|
||||
|
||||
void SimpleDialog::onOkClicked()
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ void RicExportFishbonesLateralsFeature::onActionTriggered( bool isChecked )
|
||||
exportFile->close();
|
||||
}
|
||||
|
||||
RiaLogging::info( "Completed export of Fishbones well path laterals to : " + fileName );
|
||||
RiaLogging::info( "Completed export of Fishbones well path laterals to : " + fileName.toStdString() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
+3
-2
@@ -77,8 +77,9 @@ void RicWellPathImportPerforationIntervalsFeature::onActionTriggered( bool isChe
|
||||
RimWellPath* wellPath = wellPathCollection->tryFindMatchingWellPath( entry.first );
|
||||
if ( wellPath == nullptr )
|
||||
{
|
||||
RiaLogging::warning(
|
||||
QString( "Import Well Path Perforation Intervals : Imported file contains unknown well path '%1'." ).arg( entry.first ) );
|
||||
RiaLogging::warning( QString( "Import Well Path Perforation Intervals : Imported file contains unknown well path '%1'." )
|
||||
.arg( entry.first )
|
||||
.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-1
@@ -41,6 +41,7 @@
|
||||
#include "RimWellPathValve.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
@@ -162,7 +163,7 @@ RigMswBranch buildMainBoreBranchFromGeometry( const RimWellPath*
|
||||
const double cellLength = std::fabs( cellInfo.endMD - cellInfo.startMD );
|
||||
if ( cellLength <= segmentLengthThreshold )
|
||||
{
|
||||
RiaLogging::info( QString( "Skipping segment, threshold = %1, length = %2" ).arg( segmentLengthThreshold ).arg( cellLength ) );
|
||||
RiaLogging::info( std::format( "Skipping segment, threshold = {}, length = {}", segmentLengthThreshold, cellLength ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+18
-13
@@ -23,6 +23,7 @@
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RigEclipseResultAddress.h"
|
||||
#include "Summary/RiaSummaryTools.h"
|
||||
|
||||
@@ -135,7 +136,7 @@ std::vector<RigCompletionData>
|
||||
msg += " ";
|
||||
msg += r;
|
||||
}
|
||||
RiaLogging::error( msg );
|
||||
RiaLogging::error( msg.toStdString() );
|
||||
|
||||
return fractureCompletions;
|
||||
}
|
||||
@@ -461,8 +462,9 @@ bool RicExportFractureCompletionsImpl::checkForStimPlanConductivity( const RimFr
|
||||
{
|
||||
if ( !fracTemplateStimPlan->hasConductivity() )
|
||||
{
|
||||
RiaLogging::error( "Trying to export completion data for stimPlan fracture without conductivity data for " + fracture->name() );
|
||||
RiaLogging::error( "No transmissibilities will be calculated for " + fracture->name() );
|
||||
RiaLogging::error( "Trying to export completion data for stimPlan fracture without conductivity data for " +
|
||||
fracture->name().toStdString() );
|
||||
RiaLogging::error( "No transmissibilities will be calculated for " + fracture->name().toStdString() );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -640,7 +642,7 @@ std::vector<cvf::Vec3d> RicExportFractureCompletionsImpl::computeWellPointsInFra
|
||||
std::vector<cvf::Vec3d> wellPathPoints = wellPathGeometry->wellPathPointsIncludingInterpolatedIntersectionPoint( fracture->fractureMD() );
|
||||
|
||||
RiaLogging::info( "Using user-defined perforation length on azimuth fracture." );
|
||||
RiaLogging::info( QString( "Perforation length: %1" ).arg( fracture->perforationLength() ) );
|
||||
RiaLogging::info( std::format( "Perforation length: {}", fracture->perforationLength() ) );
|
||||
double startMd = fracture->fractureMD() - fracture->perforationLength() / 2.0;
|
||||
double endMd = fracture->fractureMD() + fracture->perforationLength() / 2.0;
|
||||
|
||||
@@ -663,15 +665,15 @@ std::vector<cvf::Vec3d> RicExportFractureCompletionsImpl::computeWellPointsInFra
|
||||
|
||||
auto vecToString = []( const cvf::Vec3d& vec ) { return QString( "[%1 %2 %3]" ).arg( vec.x() ).arg( vec.y() ).arg( vec.z() ); };
|
||||
|
||||
RiaLogging::info( QString( "Start perforation position: %1" ).arg( vecToString( startPos ) ) );
|
||||
RiaLogging::info( QString( "Start perforation position in fracture plane: %1" ).arg( vecToString( startPosInFracturePlane ) ) );
|
||||
RiaLogging::info( QString( "Anchor pos: %1" ).arg( vecToString( anchorPosition ) ) );
|
||||
RiaLogging::info( QString( "Direction anchor to start position in plane: %1" ).arg( vecToString( directionToStartPosInFracturePlane ) ) );
|
||||
RiaLogging::info( QString( "Direction anchor to original start position: %1" ).arg( vecToString( directionToStartPos ) ) );
|
||||
RiaLogging::info( std::format( "Start perforation position: {}", vecToString( startPos ) ) );
|
||||
RiaLogging::info( std::format( "Start perforation position in fracture plane: {}", vecToString( startPosInFracturePlane ) ) );
|
||||
RiaLogging::info( std::format( "Anchor pos: {}", vecToString( anchorPosition ) ) );
|
||||
RiaLogging::info( std::format( "Direction anchor to start position in plane: {}", vecToString( directionToStartPosInFracturePlane ) ) );
|
||||
RiaLogging::info( std::format( "Direction anchor to original start position: {}", vecToString( directionToStartPos ) ) );
|
||||
|
||||
// Find the angle between the real direction (tangential to well path) and the fracture plane
|
||||
double angle = cvf::GeometryTools::getAngle( directionToStartPosInFracturePlane, directionToStartPos );
|
||||
RiaLogging::info( QString( "Angle: %1 degrees." ).arg( cvf::Math::toDegrees( angle ) ) );
|
||||
RiaLogging::info( std::format( "Angle: {} degrees.", cvf::Math::toDegrees( angle ) ) );
|
||||
auto rotMat = cvf::GeometryTools::rotationMatrixBetweenVectors( directionToStartPos, directionToStartPosInFracturePlane );
|
||||
|
||||
auto rotatePoint = []( const cvf::Vec3d& point, const cvf::Vec3d& offset, auto rotMat )
|
||||
@@ -691,11 +693,14 @@ std::vector<cvf::Vec3d> RicExportFractureCompletionsImpl::computeWellPointsInFra
|
||||
cvf::Vec3d transformedStartPos = rotatePoint( startPos, anchorPosition, rotMat );
|
||||
RiaLogging::info( QString( "Perforation start position: original: %1 --> adapted: %2" )
|
||||
.arg( vecToString( startPos ) )
|
||||
.arg( vecToString( transformedStartPos ) ) );
|
||||
.arg( vecToString( transformedStartPos ) )
|
||||
.toStdString() );
|
||||
|
||||
cvf::Vec3d transformedEndPos = rotatePoint( endPos, anchorPosition, rotMat );
|
||||
RiaLogging::info(
|
||||
QString( "Perforation end position: original: %1 --> adapted: %2" ).arg( vecToString( endPos ) ).arg( vecToString( transformedEndPos ) ) );
|
||||
RiaLogging::info( QString( "Perforation end position: original: %1 --> adapted: %2" )
|
||||
.arg( vecToString( endPos ) )
|
||||
.arg( vecToString( transformedEndPos ) )
|
||||
.toStdString() );
|
||||
|
||||
return wellPathPoints;
|
||||
}
|
||||
|
||||
@@ -574,7 +574,8 @@ void RicMswTableDataTools::generateWsegAicdTableRecursively( RicMswExportInfo&
|
||||
{
|
||||
RiaLogging::error( QString( "Export AICD Valve (%1): Valve is invalid. At least one required "
|
||||
"template parameter is not set." )
|
||||
.arg( aicd->label() ) );
|
||||
.arg( aicd->label() )
|
||||
.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1029,7 +1030,8 @@ void RicMswTableDataTools::generateWsegSicdTableRecursively( RicMswExportInfo&
|
||||
{
|
||||
RiaLogging::error( QString( "Export SICD Valve (%1): Valve is invalid. At least one required "
|
||||
"template parameter is not set." )
|
||||
.arg( sicd->label() ) );
|
||||
.arg( sicd->label() )
|
||||
.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-7
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaWeightedMeanCalculator.h"
|
||||
#include "RigStatisticsTools.h"
|
||||
#include "RiuMessageDialog.h"
|
||||
@@ -113,7 +114,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
if ( !outputDir.mkpath( "." ) )
|
||||
{
|
||||
QString errMsg = QString( "Could not create export folder: %1" ).arg( exportSettings.folder );
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -124,7 +125,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
if ( !fractureTransmissibilityExportInformationFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
{
|
||||
RiaLogging::error(
|
||||
QString( "Export Completions Data: Could not open the file: %1" ).arg( fractureTransmisibillityExportInformationPath ) );
|
||||
std::format( "Export Completions Data: Could not open the file: {}", fractureTransmisibillityExportInformationPath ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -173,7 +174,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
int caseId = exportSettings.caseToApply->caseId();
|
||||
QString format = QString( "Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
|
||||
QString errMsg = format.arg( wellPath->name() ).arg( caseId );
|
||||
RiaLogging::error( errMsg );
|
||||
RiaLogging::error( errMsg.toStdString() );
|
||||
}
|
||||
|
||||
std::map<size_t, std::vector<RigCompletionData>> completionsPerEclipseCellAllCompletionTypes;
|
||||
@@ -447,7 +448,7 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
QString errorMessage = QString( "Invalid or negative transmissibility value (%1) in cell %3" )
|
||||
.arg( transmissibility )
|
||||
.arg( cellIndexIJK.oneBasedLocalCellIndexString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
resultCompletion.addMetadata( "ERROR", errorMessage );
|
||||
continue;
|
||||
}
|
||||
@@ -490,7 +491,7 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
{
|
||||
QString errorMessage =
|
||||
QString( "Cannot combine completions of different types in same cell %1" ).arg( cellIndexIJK.oneBasedLocalCellIndexString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
resultCompletion.addMetadata( "ERROR", errorMessage );
|
||||
return resultCompletion; // Returning empty completion, should not be exported
|
||||
}
|
||||
@@ -499,7 +500,7 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
{
|
||||
QString errorMessage =
|
||||
QString( "Transmissibility calculation has failed for cell %1" ).arg( cellIndexIJK.oneBasedLocalCellIndexString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
resultCompletion.addMetadata( "ERROR", errorMessage );
|
||||
return resultCompletion; // Returning empty completion, should not be exported
|
||||
}
|
||||
@@ -893,7 +894,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatAndWpimultTables(
|
||||
}
|
||||
}
|
||||
|
||||
RiaLogging::info( QString( "Successfully exported completion data to %1" ).arg( exportFile->fileName() ) );
|
||||
RiaLogging::info( std::format( "Successfully exported completion data to {}", exportFile->fileName() ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
+3
-3
@@ -45,11 +45,11 @@ std::shared_ptr<QFile> RicWellPathExportCompletionsFileTools::openFile( const QS
|
||||
{
|
||||
bool createdPath = exportFolder.mkpath( "." );
|
||||
if ( createdPath )
|
||||
RiaLogging::info( "Created export folder " + folderName );
|
||||
RiaLogging::info( "Created export folder " + folderName.toStdString() );
|
||||
else
|
||||
{
|
||||
auto errorMessage = QString( "Selected output folder does not exist, and could not be created." );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ std::shared_ptr<QFile> RicWellPathExportCompletionsFileTools::openFile( const QS
|
||||
if ( !exportFile->open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
{
|
||||
auto errorMessage = QString( "Export Completions Data: Could not open the file: %1" ).arg( filePath );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
return nullptr;
|
||||
}
|
||||
return exportFile;
|
||||
|
||||
+5
-4
@@ -19,6 +19,7 @@
|
||||
#include "RicWellPathExportMswTableData.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "MswExport/RicWellPathExportMswGeometryPath.h"
|
||||
#include "RicExportCompletionDataSettingsUi.h"
|
||||
@@ -632,11 +633,11 @@ bool RicWellPathExportMswTableData::generateWellSegmentsForMswExportInfo( const
|
||||
|
||||
if ( hasIntersection )
|
||||
{
|
||||
RiaLogging::error( QString( "Valve overlap detected for perforation interval : %1" ).arg( perfInterval->name() ) );
|
||||
RiaLogging::error( std::format( "Valve overlap detected for perforation interval : {}", perfInterval->name() ) );
|
||||
|
||||
RiaLogging::error( "Name of valves" );
|
||||
RiaLogging::error( valve->name() );
|
||||
RiaLogging::error( otherValve->name() );
|
||||
RiaLogging::error( valve->name().toStdString() );
|
||||
RiaLogging::error( otherValve->name().toStdString() );
|
||||
|
||||
RiaLogging::error( "Failed to export well segments" );
|
||||
|
||||
@@ -910,7 +911,7 @@ void RicWellPathExportMswTableData::createWellPathSegments( gsl::not_null<RicMsw
|
||||
else
|
||||
{
|
||||
QString text = QString( "Skipping segment , threshold = %1, length = %2" ).arg( segmentLengthThreshold ).arg( segmentLength );
|
||||
RiaLogging::info( text );
|
||||
RiaLogging::info( text.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ void RicCreateEnsembleFromFilteredCasesFeature::onActionTriggered( bool isChecke
|
||||
{
|
||||
RiaSummaryPlotTools::createAndAppendDefaultSummaryMultiPlot( {}, { newEnsemble } );
|
||||
|
||||
RiaLogging::info( "Created ensemble " + newEnsemble->name() );
|
||||
RiaLogging::info( "Created ensemble " + newEnsemble->name().toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+4
-3
@@ -19,6 +19,7 @@
|
||||
#include "RicCreateReservoirGridEnsembleFromFileSetFeature.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "EnsembleFileSet/RimEnsembleFileSet.h"
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
@@ -76,20 +77,20 @@ void RicCreateReservoirGridEnsembleFromFileSetFeature::onActionTriggered( bool i
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning( QString( "Grid file does not exist: %1" ).arg( filePath ) );
|
||||
RiaLogging::warning( std::format( "Grid file does not exist: {}", filePath ) );
|
||||
}
|
||||
}
|
||||
gridFiles = existingGridFiles;
|
||||
|
||||
if ( gridFiles.empty() )
|
||||
{
|
||||
RiaLogging::warning( QString( "No existing grid files found for ensemble '%1'" ).arg( fileSet->name() ) );
|
||||
RiaLogging::warning( std::format( "No existing grid files found for ensemble '{}'", fileSet->name() ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Always create RimReservoirGridEnsemble
|
||||
RiaLogging::info(
|
||||
QString( "Creating Reservoir Grid Ensemble for '%1' with %2 grid files." ).arg( fileSet->name() ).arg( gridFiles.size() ) );
|
||||
QString( "Creating Reservoir Grid Ensemble for '%1' with %2 grid files." ).arg( fileSet->name() ).arg( gridFiles.size() ).toStdString() );
|
||||
|
||||
RimReservoirGridEnsemble* gridEnsemble = new RimReservoirGridEnsemble();
|
||||
gridEnsemble->setEnsembleFileSet( fileSet );
|
||||
|
||||
+5
-4
@@ -19,6 +19,7 @@
|
||||
#include "RicCreateDepthAdjustedLasFilesFeature.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RicCreateDepthAdjustedLasFilesImpl.h"
|
||||
#include "RicCreateDepthAdjustedLasFilesUi.h"
|
||||
@@ -60,7 +61,7 @@ void RicCreateDepthAdjustedLasFilesFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
if ( !featureUi.hasValidSelections() )
|
||||
{
|
||||
RiaLogging::warning( featureUi.invalidSelectionsLogString() );
|
||||
RiaLogging::warning( featureUi.invalidSelectionsLogString().toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -76,7 +77,7 @@ void RicCreateDepthAdjustedLasFilesFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
if ( eclipseCase == nullptr && geomCase == nullptr )
|
||||
{
|
||||
RiaLogging::warning( QString( "The selected case is invalid" ) );
|
||||
RiaLogging::warning( "The selected case is invalid" );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,7 +127,7 @@ void RicCreateDepthAdjustedLasFilesFeature::createDepthAdjustedWellLogFileFromEc
|
||||
cvf::ref<RigEclipseWellLogExtractor> sourceWellExtractor = wellLogCollection->findOrCreateExtractor( sourceWell, eclipseCase );
|
||||
if ( sourceWellExtractor.isNull() )
|
||||
{
|
||||
RiaLogging::info( QString( "Could not create RigEclipseWellLogExtractor for %1" ).arg( sourceWell->name() ) );
|
||||
RiaLogging::info( std::format( "Could not create RigEclipseWellLogExtractor for {}", sourceWell->name() ) );
|
||||
return;
|
||||
}
|
||||
const double rkbDiff = sourceWellExtractor->wellPathGeometry()->rkbDiff();
|
||||
@@ -155,7 +156,7 @@ void RicCreateDepthAdjustedLasFilesFeature::createDepthAdjustedWellLogFileFromGe
|
||||
cvf::ref<RigGeoMechWellLogExtractor> sourceWellExtractor = wellLogCollection->findOrCreateExtractor( sourceWell, geoMechCase );
|
||||
if ( sourceWellExtractor.isNull() )
|
||||
{
|
||||
RiaLogging::info( QString( "Could not create RigGeoMechWellLogExtractor for %1" ).arg( sourceWell->name() ) );
|
||||
RiaLogging::info( std::format( "Could not create RigGeoMechWellLogExtractor for {}", sourceWell->name() ) );
|
||||
return;
|
||||
}
|
||||
const double rkbDiff = sourceWellExtractor->wellPathGeometry()->rkbDiff();
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "RicCreateDepthAdjustedLasFilesImpl.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RicCreateDepthAdjustedLasFilesUi.h"
|
||||
@@ -294,12 +295,12 @@ std::map<int, RicCreateDepthAdjustedLasFilesImpl::IndexKDepthData>
|
||||
cvf::ref<RigEclipseWellLogExtractor> wellExtractor = wellLogCollection->findOrCreateExtractor( wellPath, eclipseCase );
|
||||
if ( wellExtractor.isNull() )
|
||||
{
|
||||
RiaLogging::info( QString( "Could not create RigEclipseWellLogExtractor for %1" ).arg( wellPath->name() ) );
|
||||
RiaLogging::info( std::format( "Could not create RigEclipseWellLogExtractor for {}", wellPath->name() ) );
|
||||
}
|
||||
const auto result = createIndexKDepthDataMap( wellExtractor, createIndexKResultAccessor( eclipseCase ) );
|
||||
if ( result.empty() )
|
||||
{
|
||||
RiaLogging::info( QString( "Not able to create Index-K depth map for %1" ).arg( wellPath->name() ) );
|
||||
RiaLogging::info( std::format( "Not able to create Index-K depth map for {}", wellPath->name() ) );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -308,17 +309,17 @@ std::map<int, RicCreateDepthAdjustedLasFilesImpl::IndexKDepthData>
|
||||
cvf::ref<RigGeoMechWellLogExtractor> wellExtractor = wellLogCollection->findOrCreateExtractor( wellPath, geomCase );
|
||||
if ( wellExtractor.isNull() )
|
||||
{
|
||||
RiaLogging::info( QString( "Could not create RigGeoMechWellLogExtractor for %1" ).arg( wellPath->name() ) );
|
||||
RiaLogging::info( std::format( "Could not create RigGeoMechWellLogExtractor for {}", wellPath->name() ) );
|
||||
}
|
||||
const auto result = createIndexKDepthDataMap( wellExtractor );
|
||||
if ( result.empty() )
|
||||
{
|
||||
RiaLogging::info( QString( "Not able to create Index-K depth map for %1" ).arg( wellPath->name() ) );
|
||||
RiaLogging::info( std::format( "Not able to create Index-K depth map for {}", wellPath->name() ) );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
RiaLogging::info( QString( "Invalid case when creating Index-K depth map for %1" ).arg( wellPath->name() ) );
|
||||
RiaLogging::info( std::format( "Invalid case when creating Index-K depth map for {}", wellPath->name() ) );
|
||||
return std::map<int, RicCreateDepthAdjustedLasFilesImpl::IndexKDepthData>();
|
||||
}
|
||||
|
||||
@@ -361,7 +362,7 @@ std::map<int, RicCreateDepthAdjustedLasFilesImpl::IndexKDepthData>
|
||||
// Must have non-empty equal length vectors!
|
||||
if ( wellIndexKValues.empty() )
|
||||
{
|
||||
RiaLogging::info( QString( "Empty vector of index-K values" ) );
|
||||
RiaLogging::info( "Empty vector of index-K values" );
|
||||
return indexKDepthsMap;
|
||||
}
|
||||
if ( wellMdValues.size() != wellTvdValues.size() || wellMdValues.size() != wellIndexKValues.size() )
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "RicExportCarfin.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RicCellRangeUi.h"
|
||||
#include "RicExportCarfinUi.h"
|
||||
@@ -69,7 +70,7 @@ void RicExportCarfin::onActionTriggered( bool isChecked )
|
||||
QFile exportFile( filePath );
|
||||
if ( !exportFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Export CARFIN: Could not open the file: %1" ).arg( filePath ) );
|
||||
RiaLogging::error( std::format( "Export CARFIN: Could not open the file: {}", filePath ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaModelExportDefines.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RicExportEclipseSectorModelUi.h"
|
||||
@@ -173,7 +174,7 @@ void RicExportEclipseSectorModelFeature::exportGrid( RimEclipseView* view, const
|
||||
|
||||
if ( !worked )
|
||||
{
|
||||
RiaLogging::error( QString( "Unable to write grid to '%1'" ).arg( exportSettings.exportGridFilename() ) );
|
||||
RiaLogging::error( std::format( "Unable to write grid to '{}'", exportSettings.exportGridFilename() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -210,7 +211,7 @@ void RicExportEclipseSectorModelFeature::exportParameters( RimEclipseView* view,
|
||||
exportSettings.refinement() );
|
||||
if ( !worked )
|
||||
{
|
||||
RiaLogging::error( QString( "Unable to write results to '%1'" ).arg( fileName ) );
|
||||
RiaLogging::error( std::format( "Unable to write results to '{}'", fileName ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,7 +233,7 @@ void RicExportEclipseSectorModelFeature::exportParameters( RimEclipseView* view,
|
||||
|
||||
if ( !worked )
|
||||
{
|
||||
RiaLogging::error( QString( "Unable to write results to '%1'" ).arg( fileName ) );
|
||||
RiaLogging::error( std::format( "Unable to write results to '{}'", fileName ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,7 +271,7 @@ void RicExportEclipseSectorModelFeature::exportFaults( RimEclipseView* view, con
|
||||
|
||||
if ( !exportFile.open( QIODevice::Text | QIODevice::WriteOnly | openFlag ) )
|
||||
{
|
||||
RiaLogging::error( "Could not open the file : " + fileName );
|
||||
RiaLogging::error( "Could not open the file : " + fileName.toStdString() );
|
||||
}
|
||||
|
||||
QTextStream stream( &exportFile );
|
||||
|
||||
@@ -328,7 +328,7 @@ bool RicExportLgrFeature::openFileForExport( const QString& folderName, const QS
|
||||
if ( !exportFolder.exists() )
|
||||
{
|
||||
bool createdPath = exportFolder.mkpath( "." );
|
||||
if ( createdPath ) RiaLogging::info( "Created export folder " + folderName );
|
||||
if ( createdPath ) RiaLogging::info( "Created export folder " + folderName.toStdString() );
|
||||
}
|
||||
|
||||
QString filePath = exportFolder.filePath( fileName );
|
||||
@@ -336,7 +336,7 @@ bool RicExportLgrFeature::openFileForExport( const QString& folderName, const QS
|
||||
if ( !exportFile->open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
{
|
||||
auto errorMessage = QString( "Export Well Path: Could not open the file: %1" ).arg( filePath );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RicExportEclipseSectorModelFeature.h"
|
||||
#include "RicExportSectorModelUi.h"
|
||||
@@ -129,11 +130,11 @@ void RicExportSectorModelFeature::doExport( RicExportSectorModelUi* exportSettin
|
||||
exportSettings->wellPadding() );
|
||||
if ( auto result = RigSimulationInputTool::exportSimulationInput( *view->eclipseCase(), settings, cellVisibility.p() ); !result )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to export sector model to DATA file: %1" ).arg( result.error() ) );
|
||||
RiaLogging::error( std::format( "Failed to export sector model to DATA file: {}", result.error() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::info( QString( "Successfully exported sector model to DATA file: %1" ).arg( exportSettings->exportDeckFilename() ) );
|
||||
RiaLogging::info( std::format( "Successfully exported sector model to DATA file: {}", exportSettings->exportDeckFilename() ) );
|
||||
}
|
||||
|
||||
auto jobColl = RimTools::jobCollection();
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RicExportWellPathsUi.h"
|
||||
|
||||
@@ -71,7 +72,7 @@ void RicExportSelectedWellPathsFeature::exportWellPath( gsl::not_null<const RimW
|
||||
writeWellPathGeometryToStream( *stream, wellPath->name(), xValues, yValues, tvdValues, mdValues, showTextMdRkb, writeProjectInfo );
|
||||
filePtr->close();
|
||||
|
||||
RiaLogging::info( QString( "Exported well geometry to %1" ).arg( filePtr->fileName() ) );
|
||||
RiaLogging::info( std::format( "Exported well geometry to {}", filePtr->fileName() ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -149,7 +150,7 @@ QFilePtr RicExportSelectedWellPathsFeature::openFileForExport( const QString& fo
|
||||
if ( !exportFolder.exists() )
|
||||
{
|
||||
bool createdPath = exportFolder.mkpath( "." );
|
||||
if ( createdPath ) RiaLogging::info( "Created export folder " + folderName );
|
||||
if ( createdPath ) RiaLogging::info( "Created export folder " + folderName.toStdString() );
|
||||
}
|
||||
|
||||
QString filePath = exportFolder.filePath( fileName );
|
||||
@@ -157,7 +158,7 @@ QFilePtr RicExportSelectedWellPathsFeature::openFileForExport( const QString& fo
|
||||
if ( !exportFile->open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
{
|
||||
auto errorMessage = QString( "Export Well Path: Could not open the file: %1" ).arg( filePath );
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
return exportFile;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ std::unique_ptr<RigNonUniformRefinement> RicRefinementSettings::nonUniformRefine
|
||||
auto subMode = m_nonUniformSubMode();
|
||||
|
||||
RiaLogging::info(
|
||||
QString( "Non-uniform refinement: sector size [%1, %2, %3]" ).arg( sectorSize.x() ).arg( sectorSize.y() ).arg( sectorSize.z() ) );
|
||||
QString( "Non-uniform refinement: sector size [%1, %2, %3]" ).arg( sectorSize.x() ).arg( sectorSize.y() ).arg( sectorSize.z() ).toStdString() );
|
||||
|
||||
for ( const auto& dc : dims )
|
||||
{
|
||||
@@ -156,7 +156,8 @@ std::unique_ptr<RigNonUniformRefinement> RicRefinementSettings::nonUniformRefine
|
||||
{
|
||||
RiaLogging::warning( QString( "Non-uniform refinement %1: no valid widths parsed from '%2'" )
|
||||
.arg( dimLabels[static_cast<size_t>( dc.dim )] )
|
||||
.arg( dc.intervals ) );
|
||||
.arg( dc.intervals )
|
||||
.toStdString() );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -165,7 +166,8 @@ std::unique_ptr<RigNonUniformRefinement> RicRefinementSettings::nonUniformRefine
|
||||
.arg( sectorStart )
|
||||
.arg( sectorEnd )
|
||||
.arg( result->sectorSize( dc.dim ) )
|
||||
.arg( widths.size() ) );
|
||||
.arg( widths.size() )
|
||||
.toStdString() );
|
||||
|
||||
result->distributeWidthsAcrossCells( dc.dim, sectorStart, sectorEnd, widths );
|
||||
}
|
||||
@@ -183,7 +185,8 @@ std::unique_ptr<RigNonUniformRefinement> RicRefinementSettings::nonUniformRefine
|
||||
.arg( dimLabels[static_cast<size_t>( dc.dim )] )
|
||||
.arg( dc.subcellCount )
|
||||
.arg( sectorStart )
|
||||
.arg( sectorEnd ) );
|
||||
.arg( sectorEnd )
|
||||
.toStdString() );
|
||||
}
|
||||
else if ( subMode == LOGARITHMIC_CENTER )
|
||||
{
|
||||
@@ -193,7 +196,8 @@ std::unique_ptr<RigNonUniformRefinement> RicRefinementSettings::nonUniformRefine
|
||||
.arg( dimLabels[static_cast<size_t>( dc.dim )] )
|
||||
.arg( dc.totalCells )
|
||||
.arg( sectorStart )
|
||||
.arg( sectorEnd ) );
|
||||
.arg( sectorEnd )
|
||||
.toStdString() );
|
||||
|
||||
result->distributeWidthsAcrossCells( dc.dim, sectorStart, sectorEnd, widths );
|
||||
}
|
||||
@@ -201,7 +205,8 @@ std::unique_ptr<RigNonUniformRefinement> RicRefinementSettings::nonUniformRefine
|
||||
RiaLogging::info( QString( "Non-uniform refinement %1: total refined count = %2 (was %3)" )
|
||||
.arg( dimLabels[static_cast<size_t>( dc.dim )] )
|
||||
.arg( result->totalRefinedCount( dc.dim ) )
|
||||
.arg( result->sectorSize( dc.dim ) ) );
|
||||
.arg( result->sectorSize( dc.dim ) )
|
||||
.toStdString() );
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -135,7 +135,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( errorMsg );
|
||||
RiaLogging::error( errorMsg.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RicEclipseCellResultToFileImpl.h"
|
||||
#include "RicExportFeatureImpl.h"
|
||||
@@ -96,7 +97,7 @@ void RicSaveEclipseInputVisibleCellsFeature::executeCommand( RimEclipseView*
|
||||
QFile exportFile( exportSettings.exportFilename );
|
||||
if ( !exportFile.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||
{
|
||||
RiaLogging::error( QString( "%1: Unable to open file '%2' for writing." ).arg( logPrefix ).arg( exportSettings.exportFilename ) );
|
||||
RiaLogging::error( std::format( "{}: Unable to open file '{}' for writing.", logPrefix, exportSettings.exportFilename() ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
|
||||
{
|
||||
QString fullError =
|
||||
QString( "Failed to exported current result to %1. Error was: %2" ).arg( exportSettings.fileName().path() ).arg( errMsg );
|
||||
RiaLogging::error( fullError );
|
||||
RiaLogging::error( fullError.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ void RicSnapshotAllPlotsToFileFeature::saveAllPlots()
|
||||
exportSnapshotOfPlotsIntoFolder( snapshotFolderName, activateWidget );
|
||||
|
||||
QString text = QString( "Exported snapshots to folder : \n%1" ).arg( snapshotFolderName );
|
||||
RiaLogging::info( text );
|
||||
RiaLogging::info( text.toStdString() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPlotWindowRedrawScheduler.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaViewRedrawScheduler.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
@@ -65,7 +66,7 @@ void RicSnapshotAllViewsToFileFeature::saveAllViews()
|
||||
exportSnapshotOfViewsIntoFolder( snapshotFolderName );
|
||||
|
||||
QString text = QString( "Exported snapshots to folder : \n%1" ).arg( snapshotFolderName );
|
||||
RiaLogging::info( text );
|
||||
RiaLogging::info( text.toStdString() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -110,7 +111,7 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
|
||||
}
|
||||
|
||||
const QString absSnapshotPath = snapshotPath.absolutePath();
|
||||
RiaLogging::info( QString( "Exporting snapshot of all views to %1" ).arg( snapshotFolderName ) );
|
||||
RiaLogging::info( std::format( "Exporting snapshot of all views to {}", snapshotFolderName ) );
|
||||
|
||||
for ( auto riv : viewsForSnapshot )
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPlotWindowRedrawScheduler.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimMultiPlot.h"
|
||||
@@ -71,11 +72,11 @@ void RicSnapshotViewToFileFeature::saveSnapshotAs( const QString& fileName, cons
|
||||
{
|
||||
if ( image.save( fileName ) )
|
||||
{
|
||||
RiaLogging::info( QString( "Exported snapshot image to %1" ).arg( fileName ) );
|
||||
RiaLogging::info( std::format( "Exported snapshot image to {}", fileName ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Error when trying to export snapshot image to %1" ).arg( fileName ) );
|
||||
RiaLogging::error( std::format( "Error when trying to export snapshot image to {}", fileName ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,7 +121,7 @@ void RicSnapshotViewToFileFeature::savePlotPdfReportAs( const QString& fileName,
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( QString( "Could not write PDF to %1" ).arg( fileName ) );
|
||||
RiaLogging::error( std::format( "Could not write PDF to {}", fileName ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "VdeArrayDataPacket.h"
|
||||
#include "VdeFileExporter.h"
|
||||
@@ -85,7 +86,7 @@ RicHoloLensSession* RicHoloLensSession::createSession( const QString&
|
||||
if ( !dbgExportFolder.isEmpty() )
|
||||
{
|
||||
newSession->m_dbgFileExportDestinationFolder = dbgExportFolder;
|
||||
RiaLogging::info( QString( "HoloLens: Debug file export will be written to folder: %1" ).arg( dbgExportFolder ) );
|
||||
RiaLogging::info( std::format( "HoloLens: Debug file export will be written to folder: {}", dbgExportFolder ) );
|
||||
}
|
||||
|
||||
return newSession;
|
||||
@@ -167,8 +168,8 @@ void RicHoloLensSession::updateSessionDataFromView( const RimGridView& activeVie
|
||||
|
||||
if ( m_restClient )
|
||||
{
|
||||
RiaLogging::info(
|
||||
QString( "HoloLens: Sending updated meta data to sharing server (sequenceNumber=%1)" ).arg( m_lastExtractionMetaDataSequenceNumber ) );
|
||||
RiaLogging::info( std::format( "HoloLens: Sending updated meta data to sharing server (sequenceNumber={})",
|
||||
m_lastExtractionMetaDataSequenceNumber ) );
|
||||
m_restClient->sendMetaData( m_lastExtractionMetaDataSequenceNumber, modelMetaJsonStr );
|
||||
}
|
||||
|
||||
@@ -180,7 +181,7 @@ void RicHoloLensSession::updateSessionDataFromView( const RimGridView& activeVie
|
||||
|
||||
if ( !outputDir.mkpath( "." ) )
|
||||
{
|
||||
RiaLogging::error( QString( "HoloLens: Could not create debug file export folder: %1" ).arg( absOutputFolder ) );
|
||||
RiaLogging::error( std::format( "HoloLens: Could not create debug file export folder: {}", absOutputFolder ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -198,8 +199,10 @@ void RicHoloLensSession::updateSessionDataFromView( const RimGridView& activeVie
|
||||
// This will write all packets seen in this extraction to file
|
||||
// packetIdsToWrite = allReferencedPacketIds;
|
||||
|
||||
RiaLogging::info(
|
||||
QString( "HoloLens: Doing debug export of data (%1 packets) to folder: %2" ).arg( packetIdsToWrite.size() ).arg( absOutputFolder ) );
|
||||
RiaLogging::info( QString( "HoloLens: Doing debug export of data (%1 packets) to folder: %2" )
|
||||
.arg( packetIdsToWrite.size() )
|
||||
.arg( absOutputFolder )
|
||||
.toStdString() );
|
||||
VdeFileExporter fileExporter( absOutputFolder );
|
||||
if ( !fileExporter.exportToFile( modelMetaJsonStr, m_packetDirectory, packetIdsToWrite ) )
|
||||
{
|
||||
@@ -239,12 +242,12 @@ void RicHoloLensSession::handleSuccessfulSendMetaData( int metaDataSequenceNumbe
|
||||
{
|
||||
cvf::Timer tim;
|
||||
|
||||
RiaLogging::info( QString( "HoloLens: Processing server response (meta data sequenceNumber=%1)" ).arg( metaDataSequenceNumber ) );
|
||||
RiaLogging::info( std::format( "HoloLens: Processing server response (meta data sequenceNumber={})", metaDataSequenceNumber ) );
|
||||
|
||||
if ( m_lastExtractionMetaDataSequenceNumber != metaDataSequenceNumber )
|
||||
{
|
||||
RiaLogging::warning(
|
||||
QString( "HoloLens: Ignoring server response, the meta data sequenceNumber(%1) has been superseded" ).arg( metaDataSequenceNumber ) );
|
||||
RiaLogging::warning( std::format( "HoloLens: Ignoring server response, the meta data sequenceNumber({}) has been superseded",
|
||||
metaDataSequenceNumber ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -276,7 +279,7 @@ void RicHoloLensSession::handleSuccessfulSendMetaData( int metaDataSequenceNumbe
|
||||
return;
|
||||
}
|
||||
|
||||
RiaLogging::info( QString( "HoloLens: Start sending data to server, %1 data arrays have been requested" ).arg( arrayIdsToSend.size() ) );
|
||||
RiaLogging::info( std::format( "HoloLens: Start sending data to server, {} data arrays have been requested", arrayIdsToSend.size() ) );
|
||||
|
||||
size_t totalBytesSent = 0;
|
||||
size_t totalNumArraysSent = 0;
|
||||
@@ -292,7 +295,7 @@ void RicHoloLensSession::handleSuccessfulSendMetaData( int metaDataSequenceNumbe
|
||||
const VdeArrayDataPacket* packet = m_packetDirectory.lookupPacket( arrayId );
|
||||
if ( !packet )
|
||||
{
|
||||
RiaLogging::warning( QString( "HoloLens: Could not get the requested data from cache, array id: %1 " ).arg( arrayId ) );
|
||||
RiaLogging::warning( std::format( "HoloLens: Could not get the requested data from cache, array id: {} ", arrayId ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -301,7 +304,8 @@ void RicHoloLensSession::handleSuccessfulSendMetaData( int metaDataSequenceNumbe
|
||||
RiaLogging::info( QString( "HoloLens: sending array id: %1, %2KB (%3 bytes)" )
|
||||
.arg( arrayId )
|
||||
.arg( packetByteArr.size() / 1024.0, 0, 'f', 2 )
|
||||
.arg( packetByteArr.size() ) );
|
||||
.arg( packetByteArr.size() )
|
||||
.toStdString() );
|
||||
|
||||
m_restClient->sendBinaryData( packetByteArr, "arrId" + QByteArray::number( arrayId ) );
|
||||
|
||||
@@ -325,7 +329,8 @@ void RicHoloLensSession::handleSuccessfulSendMetaData( int metaDataSequenceNumbe
|
||||
RiaLogging::info( QString( "HoloLens: Sending data to server (%1 arrays combined), %2KB (%3 bytes)" )
|
||||
.arg( totalNumArraysSent )
|
||||
.arg( totalBytesSent / 1024.0, 0, 'f', 2 )
|
||||
.arg( totalBytesSent ) );
|
||||
.arg( totalBytesSent )
|
||||
.toStdString() );
|
||||
|
||||
m_restClient->sendBinaryData( combinedPacketArr, "metaSeqNum" + QByteArray::number( metaDataSequenceNumber ) );
|
||||
}
|
||||
@@ -335,7 +340,8 @@ void RicHoloLensSession::handleSuccessfulSendMetaData( int metaDataSequenceNumbe
|
||||
.arg( totalNumArraysSent )
|
||||
.arg( totalMb, 0, 'f', 2 )
|
||||
.arg( totalBytesSent )
|
||||
.arg( static_cast<int>( tim.time() * 1000 ) ) );
|
||||
.arg( static_cast<int>( tim.time() * 1000 ) )
|
||||
.toStdString() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -390,7 +396,7 @@ void RicHoloLensSession::handleError( const QString& errMsg, const QString& url,
|
||||
|
||||
fullMsg += "\n url: " + url;
|
||||
|
||||
RiaLogging::error( fullMsg );
|
||||
RiaLogging::error( fullMsg.toStdString() );
|
||||
|
||||
// It is probably not correct to always consider an error a state change, but for now
|
||||
notifyObserver( RicHoloLensSessionObserver::GeneralError );
|
||||
|
||||
@@ -56,8 +56,11 @@ bool RicHoloLensSessionManager::createSession( const QString& serverUrl, const Q
|
||||
return false;
|
||||
}
|
||||
|
||||
RiaLogging::info(
|
||||
QString( "Creating HoloLens session: '%1' with pin code: %2, server url: %3" ).arg( sessionName ).arg( sessionPinCode ).arg( serverUrl ) );
|
||||
RiaLogging::info( QString( "Creating HoloLens session: '%1' with pin code: %2, server url: %3" )
|
||||
.arg( sessionName )
|
||||
.arg( sessionPinCode )
|
||||
.arg( serverUrl )
|
||||
.toStdString() );
|
||||
m_session = RicHoloLensSession::createSession( serverUrl, sessionName, sessionPinCode.toLatin1(), this );
|
||||
|
||||
refreshToolbarState();
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "RifJsonEncodeDecode.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
#include "cvfDrawableGeo.h"
|
||||
@@ -202,7 +203,8 @@ void VdeVizDataExtractor::extractViewContents( QString* modelMetaJson
|
||||
.arg( totNumPrimitives )
|
||||
.arg( static_cast<int>( tim.time() * 1000 ) )
|
||||
.arg( buildMeshes_ms )
|
||||
.arg( fillPacketDir_ms ) );
|
||||
.arg( fillPacketDir_ms )
|
||||
.toStdString() );
|
||||
|
||||
// cvf::Trace::show("Total number of primitives extracted: %d in %dms", totNumPrimitives,
|
||||
// static_cast<int>(tim.time()*1000));
|
||||
@@ -257,7 +259,8 @@ std::unique_ptr<VdeMesh> VdeVizDataExtractor::createMeshFromExportPart( const Vd
|
||||
const cvf::PrimitiveType primType = primSet->primitiveType();
|
||||
if ( primType != cvf::PT_TRIANGLES && primType != cvf::PT_LINES )
|
||||
{
|
||||
RiaLogging::debug( QString( "Currently only triangle and line primitive sets are supported (saw primitive type: %1)" ).arg( primType ) );
|
||||
RiaLogging::debug( std::format( "Currently only triangle and line primitive sets are supported (saw primitive type: {})",
|
||||
static_cast<int>( primType ) ) );
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@ bool RicAppendSummaryPlotsForObjectsFeature::isSelectionCompatibleWithPlot( cons
|
||||
|
||||
if ( !errorText.isEmpty() )
|
||||
{
|
||||
RiaLogging::error( errorText );
|
||||
RiaLogging::error( errorText.toStdString() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,11 +62,11 @@ void RicExportPolygonCsvFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
if ( !RimPolygonTools::exportPolygonCsv( sourcePolygon, fileName ) )
|
||||
{
|
||||
RiaLogging::error( "Failed to export polygon to " + fileName );
|
||||
RiaLogging::error( "Failed to export polygon to " + fileName.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::info( "Completed polygon export to " + fileName );
|
||||
RiaLogging::info( "Completed polygon export to " + fileName.toStdString() );
|
||||
app->setLastUsedDialogDirectory( RimPolygonTools::polygonCacheName(), QFileInfo( fileName ).absolutePath() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,11 +62,11 @@ void RicExportPolygonPolFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
if ( !RimPolygonTools::exportPolygonPol( selPolygons, fileName ) )
|
||||
{
|
||||
RiaLogging::error( "Failed to export polygon(s) to " + fileName );
|
||||
RiaLogging::error( "Failed to export polygon(s) to " + fileName.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::info( "Completed polygon export to " + fileName );
|
||||
RiaLogging::info( "Completed polygon export to " + fileName.toStdString() );
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory( RimPolygonTools::polygonCacheName(), QFileInfo( fileName ).absolutePath() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "RiaImportEclipseCaseTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesGrid.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RicCloseCaseFeature.h"
|
||||
@@ -156,7 +157,7 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
|
||||
RimEclipseCase* eclipseCase = loadEclipseCase( fileName );
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to load model from file: " ).arg( fileName ) );
|
||||
RiaLogging::error( std::format( "Failed to load model from file: ", fileName ) );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -169,7 +170,7 @@ void RicCreateEnsembleWellLogFeature::executeCommand( const RicCreateEnsembleWel
|
||||
{
|
||||
if ( !fi.absoluteDir().mkpath( wellLogExportDirName ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Unable to create directory for well log export: " ).arg( exportFolder ) );
|
||||
RiaLogging::error( std::format( "Unable to create directory for well log export: ", exportFolder ) );
|
||||
RicCloseCaseFeature::deleteEclipseCase( eclipseCase );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "RicElasticPropertiesImportTools.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RifCsvUserDataParser.h"
|
||||
#include "RifElasticPropertiesReader.h"
|
||||
@@ -59,7 +60,7 @@ void RicElasticPropertiesImportTools::importElasticPropertiesFromFile( const QSt
|
||||
}
|
||||
catch ( FileParseException& exception )
|
||||
{
|
||||
RiaLogging::warning( QString( "Facies properties import failed: '%1'." ).arg( exception.message ) );
|
||||
RiaLogging::warning( std::format( "Facies properties import failed: '{}'.", exception.message ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,11 +131,11 @@ void RicExportContourMapToTextFeature::onActionTriggered( bool isChecked )
|
||||
QString displayMessage = QString( "Problem exporting contour map:\n%2" ).arg( messages.join( "\n" ) );
|
||||
if ( response.status() == caf::PdmScriptResponse::COMMAND_ERROR )
|
||||
{
|
||||
RiaLogging::error( displayMessage );
|
||||
RiaLogging::error( displayMessage.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning( displayMessage );
|
||||
RiaLogging::warning( displayMessage.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ void RicFaciesPropertiesImportTools::importFaciesPropertiesFromFile( const QStri
|
||||
}
|
||||
catch ( RifRoffReaderException& ex )
|
||||
{
|
||||
RiaLogging::error( QString::fromStdString( ex.message ) );
|
||||
RiaLogging::error( ex.message );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ RimEnsembleWellLogs* RicImportEnsembleWellLogsFeature::createSingleEnsembleWellL
|
||||
cases.push_back( logFileInfo );
|
||||
if ( !errorMessage.isEmpty() )
|
||||
{
|
||||
RiaLogging::warning( errorMessage );
|
||||
RiaLogging::warning( errorMessage.toStdString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesGrid.h"
|
||||
#include "RiaPreferencesSummary.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RicImportSummaryCasesFeature.h"
|
||||
|
||||
@@ -338,7 +339,7 @@ void RicImportGeneralDataFeature::openFileDialog( ImportFileType fileTypes )
|
||||
|
||||
if ( !openEclipseFilesFromFileNames( fileNames, true, true ) )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to open file names: %1" ).arg( fileNames.join( ", " ) ) );
|
||||
RiaLogging::error( std::format( "Failed to open file names: {}", fileNames.join( ", " ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -106,7 +106,7 @@ void RicImportWellLogOsduFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( "Importing OSDU well log failed: " + errorMessage );
|
||||
RiaLogging::error( "Importing OSDU well log failed: " + errorMessage.toStdString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "RicReloadSummaryCaseFeature.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "Summary/RiaSummaryTools.h"
|
||||
|
||||
#include "RimObservedDataCollection.h"
|
||||
@@ -148,6 +149,6 @@ void RicReloadSummaryCaseFeature::reloadSelectedCasesAndUpdate()
|
||||
RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots( summaryCase );
|
||||
summaryCase->updateConnectedEditors();
|
||||
|
||||
RiaLogging::info( QString( "Reloaded data for %1" ).arg( summaryCase->summaryHeaderFilename() ) );
|
||||
RiaLogging::info( std::format( "Reloaded data for {}", summaryCase->summaryHeaderFilename() ) );
|
||||
}
|
||||
}
|
||||
@@ -289,7 +289,7 @@ RicSummaryCaseRestartDialogResult RicSummaryCaseRestartDialog::openDialog( const
|
||||
dialogResult.gridFiles.clear();
|
||||
|
||||
for ( const QString& warning : warnings )
|
||||
RiaLogging::error( warning );
|
||||
RiaLogging::error( warning.toStdString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "RicWellMeasurementImportTools.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimGridView.h"
|
||||
@@ -70,7 +71,7 @@ void RicWellMeasurementImportTools::importWellMeasurementsFromFiles( const QStri
|
||||
}
|
||||
catch ( FileParseException& exception )
|
||||
{
|
||||
RiaLogging::warning( QString( "Well measurement import failed: '%1'." ).arg( exception.message ) );
|
||||
RiaLogging::warning( std::format( "Well measurement import failed: '{}'.", exception.message ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -21,6 +21,7 @@
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesSummary.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RicResampleDialog.h"
|
||||
|
||||
@@ -88,7 +89,7 @@ void RicAsciiExportSummaryPlotFeature::onActionTriggered( bool isChecked )
|
||||
caf::ProgressInfo pi( selectedSummaryPlots.size(), QString( "Exporting plot data to ASCII" ) );
|
||||
size_t progress = 0;
|
||||
|
||||
RiaLogging::info( QString( "Writing to directory %1" ).arg( saveDir ) );
|
||||
RiaLogging::info( std::format( "Writing to directory {}", saveDir ) );
|
||||
for ( RimSummaryPlot* summaryPlot : selectedSummaryPlots )
|
||||
{
|
||||
QString fileName = saveDir + "/" + caf::Utils::makeValidFileBasename( summaryPlot->description() ) + ".ascii";
|
||||
@@ -143,13 +144,13 @@ bool RicAsciiExportSummaryPlotFeature::exportTextToFile( const QString& fileName
|
||||
return false;
|
||||
}
|
||||
|
||||
RiaLogging::info( QString( "Writing values for summary plot(s) to file: %1" ).arg( fileName ) );
|
||||
RiaLogging::info( std::format( "Writing values for summary plot(s) to file: {}", fileName ) );
|
||||
|
||||
QTextStream out( &file );
|
||||
|
||||
out << text;
|
||||
|
||||
RiaLogging::info( QString( "Competed writing values for summary plot(s) to file %1" ).arg( fileName ) );
|
||||
RiaLogging::info( std::format( "Competed writing values for summary plot(s) to file {}", fileName ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-1
@@ -23,6 +23,7 @@
|
||||
#include "Summary/RiaSummaryPlotTools.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RimAsciiDataCurve.h"
|
||||
#include "RimSummaryCurveAppearanceCalculator.h"
|
||||
@@ -159,7 +160,7 @@ std::vector<RimAsciiDataCurve*> RicPasteAsciiDataToSummaryPlotFeature::parseCurv
|
||||
auto parseResult = parser.parse( parseOptions );
|
||||
if ( !parseResult )
|
||||
{
|
||||
RiaLogging::error( QString( "Failed to parse pasted data: " ) + parseResult.error() );
|
||||
RiaLogging::error( std::format( "Failed to parse pasted data: {}", parseResult.error() ) );
|
||||
return curves;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaEclipseFileNameTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "Summary/RiaSummaryTools.h"
|
||||
|
||||
#include "RicImportGeneralDataFeature.h"
|
||||
@@ -69,7 +70,7 @@ void RicReplaceSummaryCaseFeature::onActionTriggered( bool isChecked )
|
||||
RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots( summaryCase );
|
||||
summaryCase->updateConnectedEditors();
|
||||
|
||||
RiaLogging::info( QString( "Replaced summary data for %1" ).arg( oldSummaryHeaderFilename ) );
|
||||
RiaLogging::info( std::format( "Replaced summary data for {}", oldSummaryHeaderFilename ) );
|
||||
|
||||
RiaEclipseFileNameTools helper( newFileName );
|
||||
auto newGridFileName = helper.findRelatedGridFile();
|
||||
@@ -94,7 +95,7 @@ void RicReplaceSummaryCaseFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
RimReloadCaseTools::reloadEclipseGrid( gridModel );
|
||||
|
||||
RiaLogging::info( QString( "Replaced grid data for %1" ).arg( previousGridFileName ) );
|
||||
RiaLogging::info( std::format( "Replaced grid data for {}", previousGridFileName ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Ensemble/RiaEnsembleImportTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "Summary/RiaSummaryTools.h"
|
||||
|
||||
#include "RicImportSummaryCasesFeature.h"
|
||||
@@ -56,7 +57,7 @@ void RicReplaceSummaryEnsembleFeature::onActionTriggered( bool isChecked )
|
||||
auto summaryEnsemble = caf::SelectionManager::instance()->selectedItemOfType<RimSummaryEnsemble>();
|
||||
if ( !summaryEnsemble ) return;
|
||||
|
||||
RiaLogging::info( QString( "Starting replace ensemble for '" ) + summaryEnsemble->name() + "'" );
|
||||
RiaLogging::info( std::format( "Starting replace ensemble for '{}'", summaryEnsemble->name() ) );
|
||||
|
||||
QString pathCacheName = "ENSEMBLE_FILES";
|
||||
auto result = RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialogWithGrouping( "Import Ensemble", pathCacheName );
|
||||
@@ -77,7 +78,7 @@ void RicReplaceSummaryEnsembleFeature::onActionTriggered( bool isChecked )
|
||||
collection->updateFileSetNames();
|
||||
collection->updateAllRequiredEditors();
|
||||
|
||||
RiaLogging::info( QString( "Completed replace ensemble, new name is '" ) + summaryEnsemble->name() + "'" );
|
||||
RiaLogging::info( std::format( "Completed replace ensemble, new name is '{}'", summaryEnsemble->name() ) );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -115,7 +116,7 @@ void RicReplaceSummaryEnsembleFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
RiaSummaryTools::updateConnectedPlots( summaryEnsemble );
|
||||
|
||||
RiaLogging::info( QString( "Completed replace ensemble, new name is '" ) + summaryEnsemble->name() + "'" );
|
||||
RiaLogging::info( std::format( "Completed replace ensemble, new name is '{}'", summaryEnsemble->name() ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "RiaImportEclipseCaseTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesSummary.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaTextStringTools.h"
|
||||
#include "Summary/RiaSummaryPlotTools.h"
|
||||
#include "Summary/RiaSummaryStringTools.h"
|
||||
@@ -213,7 +214,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( "The summaryplot option: \"" + arguments[optionIdx] + "\" is unknown." );
|
||||
RiaLogging::error( std::format( "The summaryplot option: \"{}\" is unknown.", arguments[optionIdx] ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -396,8 +397,8 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
|
||||
->results( RiaDefines::PorosityModelType::MATRIX_MODEL )
|
||||
->resultInfo( cellResAddr.eclipseResultAddress ) ) )
|
||||
{
|
||||
RiaLogging::warning( "Could not find a restart result property with name: \"" +
|
||||
cellResAddr.eclipseResultAddress.resultName() + "\"" );
|
||||
RiaLogging::warning( std::format( "Could not find a restart result property with name: \"{}\"",
|
||||
cellResAddr.eclipseResultAddress.resultName() ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -455,8 +456,8 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
|
||||
->results( RiaDefines::PorosityModelType::MATRIX_MODEL )
|
||||
->resultInfo( cellResAddr.eclipseResultAddress ) ) )
|
||||
{
|
||||
RiaLogging::warning( "Could not find a restart result property with name: \"" +
|
||||
cellResAddr.eclipseResultAddress.resultName() + "\"" );
|
||||
RiaLogging::warning( std::format( "Could not find a restart result property with name: \"{}\"",
|
||||
cellResAddr.eclipseResultAddress.resultName() ) );
|
||||
continue;
|
||||
}
|
||||
RimGridTimeHistoryCurve* newCurve = new RimGridTimeHistoryCurve();
|
||||
@@ -688,8 +689,9 @@ std::set<RifEclipseSummaryAddress>
|
||||
{
|
||||
if ( !usedFilters[cfIdx] )
|
||||
{
|
||||
RiaLogging::warning( "Vector filter \"" + summaryAddressFilters[static_cast<int>( cfIdx )] +
|
||||
"\" did not match anything in case: \"" + sumCase->nativeCaseName() + "\"" );
|
||||
RiaLogging::warning( std::format( "Vector filter \"{}\" did not match anything in case: \"{}\"",
|
||||
summaryAddressFilters[static_cast<int>( cfIdx )],
|
||||
sumCase->nativeCaseName() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -720,8 +722,9 @@ std::vector<RimSummaryCurve*> RicSummaryPlotFeatureImpl::addCurvesFromAddressFil
|
||||
{
|
||||
if ( !usedFilters[cfIdx] )
|
||||
{
|
||||
RiaLogging::warning( "Vector filter \"" + curveFilters[static_cast<int>( cfIdx )] + "\" did not match anything in case: \"" +
|
||||
summaryCase->nativeCaseName() + "\"" );
|
||||
RiaLogging::warning( std::format( "Vector filter \"{}\" did not match anything in case: \"{}\"",
|
||||
curveFilters[static_cast<int>( cfIdx )],
|
||||
summaryCase->nativeCaseName() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
|
||||
#include "RifSurfio.h"
|
||||
|
||||
@@ -146,9 +147,9 @@ void RicExportSurfaceToGriFeature::exportSurfaces( const std::vector<RimSurface*
|
||||
: RifSurfio::exportToIrap( fileName.toStdString(), gridParams, depthValues );
|
||||
|
||||
if ( ok )
|
||||
RiaLogging::info( QString( "Exported surface to: %1" ).arg( fileName ) );
|
||||
RiaLogging::info( std::format( "Exported surface to: {}", fileName ) );
|
||||
else
|
||||
RiaLogging::error( QString( "Failed to export surface to: %1" ).arg( fileName ) );
|
||||
RiaLogging::error( std::format( "Failed to export surface to: {}", fileName ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 231 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user