27 #include "qgis_core.h"
28 #include "qgsconfig.h"
33 #define QgsDebugMsg(str) QgsLogger::debug(QString(str), 1, __FILE__, __FUNCTION__, __LINE__)
34 #define QgsDebugMsgLevel(str, level) if ( level <= QgsLogger::debugLevel() ) { QgsLogger::debug(QString(str), (level), __FILE__, __FUNCTION__, __LINE__); }(void)(0)
35 #define QgsDebugCall QgsScopeLogger _qgsScopeLogger(__FILE__, __FUNCTION__, __LINE__)
37 #define QgsDebugCall do {} while(false)
38 #define QgsDebugMsg(str) do {} while(false)
39 #define QgsDebugMsgLevel(str, level) do {} while(false)
71 static void debug(
const QString &msg,
int debuglevel = 1,
const char *file =
nullptr,
const char *
function =
nullptr,
int line = -1 );
74 static void debug(
const QString &var,
int val,
int debuglevel = 1,
const char *file =
nullptr,
const char *
function =
nullptr,
int line = -1 );
80 static void debug(
const QString &var,
double val,
int debuglevel = 1,
const char *file =
nullptr,
const char *
function =
nullptr,
int line = -1 )
SIP_SKIP SIP_SKIP;
86 template <
typename T>
static void debug(
const QString &var, T val,
const char *file =
nullptr,
const char *
function =
nullptr,
89 std::ostringstream os;
90 os << var.toLocal8Bit().data() <<
" = " << val;
91 debug( var, os.str().c_str(), file,
function, line, debuglevel );
95 static void warning(
const QString &msg );
98 static void critical(
const QString &msg );
101 static void fatal(
const QString &msg );
109 if ( sDebugLevel == -999 )
115 static void logMessageToFile(
const QString &message );
121 static QString logFile();
127 static int sDebugLevel;
128 static int sPrefixLength;
149 const char *_file =
nullptr;
150 const char *_func =
nullptr;