From dd8a1fa01cfd7332fc5a3cd1c066843958a1ea51 Mon Sep 17 00:00:00 2001 From: bdm-oslandia Date: Fri, 24 Jan 2025 16:14:56 +0100 Subject: [PATCH] fix: display real caller data insteadof log call --- src/server/services/wfs/qgswfsparameters.cpp | 4 ++-- src/server/services/wfs/qgswfsparameters.h | 2 +- src/server/services/wms/qgswmsparameters.cpp | 4 ++-- src/server/services/wms/qgswmsparameters.h | 2 +- src/server/services/wmts/qgswmtsparameters.cpp | 4 ++-- src/server/services/wmts/qgswmtsparameters.h | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/server/services/wfs/qgswfsparameters.cpp b/src/server/services/wfs/qgswfsparameters.cpp index f1ea2e25411a..511fc40f1f38 100644 --- a/src/server/services/wfs/qgswfsparameters.cpp +++ b/src/server/services/wfs/qgswfsparameters.cpp @@ -364,8 +364,8 @@ namespace QgsWfs return version; } - void QgsWfsParameters::log( const QString &msg ) const + void QgsWfsParameters::log( const QString &msg, const char *file, const char *function, int line ) const { - QgsMessageLog::logMessage( msg, "Server", Qgis::MessageLevel::Info ); + QgsMessageLog::logMessage( msg, "Server", Qgis::MessageLevel::Info, true, file, function, line ); } } // namespace QgsWfs diff --git a/src/server/services/wfs/qgswfsparameters.h b/src/server/services/wfs/qgswfsparameters.h index 50509a58712e..2bfa5e0da54e 100644 --- a/src/server/services/wfs/qgswfsparameters.h +++ b/src/server/services/wfs/qgswfsparameters.h @@ -283,7 +283,7 @@ namespace QgsWfs bool loadParameter( const QString &key, const QString &value ) override; void save( const QgsWfsParameter ¶meter ); - void log( const QString &msg ) const; + void log( const QString &msg, const char *file = __builtin_FILE(), const char *function = __builtin_FUNCTION(), int line = __builtin_LINE() ) const; QList mVersions; QMap mWfsParameters; diff --git a/src/server/services/wms/qgswmsparameters.cpp b/src/server/services/wms/qgswmsparameters.cpp index 51938793114d..738df198740f 100644 --- a/src/server/services/wms/qgswmsparameters.cpp +++ b/src/server/services/wms/qgswmsparameters.cpp @@ -2056,9 +2056,9 @@ namespace QgsWms return mWmsParameters.value( QgsWmsParameter::WMTVER ).toString(); } - void QgsWmsParameters::log( const QString &msg ) const + void QgsWmsParameters::log( const QString &msg, const char *file, const char *function, int line ) const { - QgsMessageLog::logMessage( msg, QStringLiteral( "Server" ), Qgis::MessageLevel::Info ); + QgsMessageLog::logMessage( msg, QStringLiteral( "Server" ), Qgis::MessageLevel::Info, true, file, function, line ); } void QgsWmsParameters::raiseError( const QString &msg ) const diff --git a/src/server/services/wms/qgswmsparameters.h b/src/server/services/wms/qgswmsparameters.h index 117b9e9362b9..762b51a5d57c 100644 --- a/src/server/services/wms/qgswmsparameters.h +++ b/src/server/services/wms/qgswmsparameters.h @@ -1530,7 +1530,7 @@ namespace QgsWms QgsWmsParameter idParameter( QgsWmsParameter::Name name, int id ) const; void raiseError( const QString &msg ) const; - void log( const QString &msg ) const; + void log( const QString &msg, const char *file = __builtin_FILE(), const char *function = __builtin_FUNCTION(), int line = __builtin_LINE() ) const; QgsWmsParametersExternalLayer externalLayerParameter( const QString &name ) const; diff --git a/src/server/services/wmts/qgswmtsparameters.cpp b/src/server/services/wmts/qgswmtsparameters.cpp index e8a320cbf3f1..080a3e7df8a7 100644 --- a/src/server/services/wmts/qgswmtsparameters.cpp +++ b/src/server/services/wmts/qgswmtsparameters.cpp @@ -292,8 +292,8 @@ namespace QgsWmts return version; } - void QgsWmtsParameters::log( const QString &msg ) const + void QgsWmtsParameters::log( const QString &msg, const char *file, const char *function, int line ) const { - QgsMessageLog::logMessage( msg, "Server", Qgis::MessageLevel::Info ); + QgsMessageLog::logMessage( msg, "Server", Qgis::MessageLevel::Info, true, file, function, line ); } } // namespace QgsWmts diff --git a/src/server/services/wmts/qgswmtsparameters.h b/src/server/services/wmts/qgswmtsparameters.h index d128d8469641..06c605229e84 100644 --- a/src/server/services/wmts/qgswmtsparameters.h +++ b/src/server/services/wmts/qgswmtsparameters.h @@ -314,7 +314,7 @@ namespace QgsWmts bool loadParameter( const QString &key, const QString &value ) override; void save( const QgsWmtsParameter ¶meter ); - void log( const QString &msg ) const; + void log( const QString &msg, const char *file = __builtin_FILE(), const char *function = __builtin_FUNCTION(), int line = __builtin_LINE() ) const; QList mVersions; QMap mWmtsParameters;