28 #define QgsDebugMsg(str) QgsLogger::debug(QString(str), 1, __FILE__, __FUNCTION__, __LINE__)
29 #define QgsDebugMsgLevel(str, level) QgsLogger::debug(QString(str), (level), __FILE__, __FUNCTION__, __LINE__)
30 #define QgsDebugCall QgsScopeLogger _qgsScopeLogger(__FILE__, __FUNCTION__, __LINE__)
33 #define QgsDebugMsg(str)
34 #define QgsDebugMsgLevel(str, level)
63 static void debug(
const QString& msg,
int debuglevel = 1,
const char*
file = NULL,
const char*
function = NULL,
int line = -1 );
66 static void debug(
const QString& var,
int val,
int debuglevel = 1,
const char*
file = NULL,
const char*
function = NULL,
int line = -1 );
70 static void debug(
const QString& var,
double val,
int debuglevel = 1,
const char*
file = NULL,
const char*
function = NULL,
int line = -1 );
74 template <
typename T>
static void debug(
const QString& var, T val,
const char*
file = 0,
const char*
function = 0,
75 int line = -1,
int debuglevel = 1 )
77 std::ostringstream os;
78 os << var.toLocal8Bit().data() <<
" = " << val;
79 debug( var, os.str().c_str(),
file,
function, line, debuglevel );
83 static void warning(
const QString& msg );
86 static void critical(
const QString& msg );
89 static void fatal(
const QString& msg );
96 static void logMessageToFile( QString theMessage );
100 static const QString
logFile() { init();
return sLogFile; }
106 static int sDebugLevel;
107 static int sPrefixLength;
108 static QString sLogFile;
109 static QString sFileFilter;
117 : _file( file ), _func( func ), _line( line )