mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -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
@@ -22,6 +22,7 @@
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPorosityModel.h"
|
||||
#include "RiaQStringFormatter.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
#include "RiuMessageDialog.h"
|
||||
|
||||
@@ -737,7 +738,7 @@ void RimGridCalculation::filterResults( RimGridView*
|
||||
{
|
||||
QString errorMessage =
|
||||
"Grid Property Calculator: Invalid input data for default result property, no data assigned to non-visible cells.";
|
||||
RiaLogging::error( errorMessage );
|
||||
RiaLogging::error( errorMessage.toStdString() );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -828,12 +829,12 @@ bool RimGridCalculation::calculateForCases( const std::vector<RimEclipseCase*>&
|
||||
if ( isMultipleCasesPresent )
|
||||
{
|
||||
QString txt = "Starting calculation '" + description() + "' for " + QString::number( calculationCases.size() ) + " cases.";
|
||||
RiaLogging::info( txt );
|
||||
RiaLogging::info( txt.toStdString() );
|
||||
|
||||
if ( hasAggregationExpression )
|
||||
{
|
||||
RiaLogging::info( QString( " Detected aggregated value in expression '%1'." ).arg( m_expression() ) );
|
||||
RiaLogging::info( QString( " Aggregated value per realization is displayed in one column per time step." ) );
|
||||
RiaLogging::info( std::format( " Detected aggregated value in expression '{}'.", m_expression() ) );
|
||||
RiaLogging::info( " Aggregated value per realization is displayed in one column per time step." );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -889,7 +890,7 @@ bool RimGridCalculation::calculateForCases( const std::vector<RimEclipseCase*>&
|
||||
else
|
||||
timeHeader += "Undefined";
|
||||
}
|
||||
RiaLogging::info( timeHeader );
|
||||
RiaLogging::info( timeHeader.toStdString() );
|
||||
}
|
||||
|
||||
std::vector<std::vector<double>>* scalarResultFrames =
|
||||
@@ -916,7 +917,7 @@ bool RimGridCalculation::calculateForCases( const std::vector<RimEclipseCase*>&
|
||||
auto dataForVariable = getActiveCellValuesForVariable( v, tsId, porosityModel, sourceCase, calculationCase );
|
||||
if ( dataForVariable.empty() )
|
||||
{
|
||||
RiaLogging::error( QString( " No data found for variable '%1'." ).arg( v->name() ) );
|
||||
RiaLogging::error( std::format( " No data found for variable '{}'.", v->name() ) );
|
||||
}
|
||||
else if ( inputValueVisibilityFilter && hasAggregationExpression )
|
||||
{
|
||||
@@ -1005,7 +1006,7 @@ bool RimGridCalculation::calculateForCases( const std::vector<RimEclipseCase*>&
|
||||
|
||||
allAggregatedValues.push_back( aggregatedValuesOneTimeStep );
|
||||
|
||||
RiaLogging::info( txt );
|
||||
RiaLogging::info( txt.toStdString() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1021,12 +1022,12 @@ bool RimGridCalculation::calculateForCases( const std::vector<RimEclipseCase*>&
|
||||
RiaLogging::info( " Statistics" );
|
||||
for ( const auto& txt : statisticsText )
|
||||
{
|
||||
RiaLogging::info( txt );
|
||||
RiaLogging::info( txt.toStdString() );
|
||||
}
|
||||
}
|
||||
|
||||
QString txt = "Completed calculation '" + description() + "' for " + QString::number( calculationCases.size() ) + " cases.";
|
||||
RiaLogging::info( txt );
|
||||
RiaLogging::info( txt.toStdString() );
|
||||
}
|
||||
|
||||
return !anyErrorsDetected;
|
||||
@@ -1148,7 +1149,7 @@ std::pair<bool, QStringList> RimGridCalculation::createStatisticsText( const std
|
||||
{
|
||||
QString msg = "Detected mismatch in number of time steps for aggregated values. All grid "
|
||||
"cases must have identical number of time steps.";
|
||||
RiaLogging::error( msg );
|
||||
RiaLogging::error( msg.toStdString() );
|
||||
anyErrorsDetected = true;
|
||||
return { anyErrorsDetected, statisticsText };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user