C++ (Qt)#include <QRegExp> #define stringify(v1) #v1#define quote(v1) stringify(v1) #define STIP_FUNC \ QString::fromAscii(Q_FUNC_INFO).replace( \ QRegExp("^.+\\s((?:[\\w\\d]+::)+)?([\\w\\d\\<\\>~]+)(?:\\(.*\\)).*$"), \ QString(QLatin1String("<\\1\\2()>"))).toAscii().data() #define DEBUG(...) qDebug() << __FILE__ ":" quote(__LINE__) << STIP_FUNC << "\t" ##__VA_ARGS__#define WARNING(...) qWarning() << __FILE__ ":" quote(__LINE__) << STIP_FUNC << "\t" ##__VA_ARGS__
C++ (Qt)DEBUG() << m_listLastMsg.size() << QString("TEST_1");WARNING() << m_listLastMsg.size() << QString("TEST_2");
C++ (Qt)..\..\Prog\src\glob_logger.cpp:205 <G_Logger::showMsg()> 30 "TEST_1"..\..\Prog\src\glob_logger.cpp:206 <G_Logger::showMsg()> 30 "TEST_2"
C++ (Qt)WARNING()<< m_listLastMsg.size() << QString("TEST_2") << "my const char string" << 134 << (QStringList()<< "dssds" << "sdsd" ) << 152.25F;