Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -110,9 +110,11 @@ const QString CUSTOM_URL_SCHEME = "hifi:"; · 109 unmodified lines | ||
| 110 | 110 | |
| 111 | 111 | void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) { |
| 112 | 112 | if (message.size() > 0) { |
| 113 | − QString messageWithNewLine = message + "\n"; | |
| 114 | − fprintf(stdout, "%s", messageWithNewLine.toLocal8Bit().constData()); | |
| 115 | − Application::getInstance()->getLogger()->addMessage(messageWithNewLine.toLocal8Bit().constData()); | |
| 113 | + QString dateString = QDateTime::currentDateTime().toTimeSpec(Qt::LocalTime).toString(Qt::ISODate); | |
| 114 | + QString formattedMessage = QString("[%1] %2\n").arg(dateString).arg(message); | |
| 115 | + | |
| 116 | + fprintf(stdout, "%s", qPrintable(formattedMessage)); | |
| 117 | + Application::getInstance()->getLogger()->addMessage(qPrintable(formattedMessage)); | |
| 116 | 118 | } |
| 117 | 119 | } |
| 118 | 120 | |