18 #include "boost/shared_ptr.hpp"
23 #include <QTextStream>
25 #include <QApplication>
35 mMessageLevel(messageLevel),
36 mTimeoutTime(timeoutTime),
37 mTimeStamp(QDateTime::currentDateTime()),
50 void Message::setThreadName()
52 if (QApplication::instance()->thread() == QThread::currentThread())
56 mThread = QThread::currentThread()->objectName();
58 mThread =
"0x"+QString::number(
reinterpret_cast<long>(QThread::currentThreadId()), 16);
66 QString printableMessage;
68 printableMessage =
mText;
70 printableMessage = QString(
"[%1][%2] %3")
81 return printableMessage;