58void QgsLogger::debug(
const QString &msg,
int debuglevel,
const char *file,
const char *function,
int line )
62 if ( !file && !sFileFilter()->isEmpty() && !sFileFilter()->endsWith( file ) )
65 if ( sDebugLevel == 0 || debuglevel > sDebugLevel )
73 if ( qApp && qApp->thread() != QThread::currentThread() )
75 m.prepend( QStringLiteral(
"[thread:0x%1] " ).arg(
reinterpret_cast< qint64
>( QThread::currentThread() ), 0, 16 ) );
78 m.prepend( QStringLiteral(
"[%1ms] " ).arg( sTime()->elapsed() ) );
83 m.prepend( QStringLiteral(
" (%1) " ).arg( function ) );
89 m.prepend( QStringLiteral(
":%1 :" ).arg( line ) );
91 m.prepend( QString(
"(%1) :" ).arg( line ) );
96 m.prepend( file + ( file[0] ==
'/' ? sPrefixLength : 0 ) );
102 if ( sLogFile()->isEmpty() )
104 qDebug(
"%s", m.toUtf8().constData() );
static void debug(const QString &msg, int debuglevel=1, const char *file=nullptr, const char *function=nullptr, int line=-1)
Goes to qDebug.