Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -116,12 +116,10 @@ const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::D · 115 unmodified lines | |||
| 116 | const QString DEFAULT_SCRIPTS_JS_URL = "http://public.highfidelity.io/scripts/defaultScripts.js"; | 116 | const QString DEFAULT_SCRIPTS_JS_URL = "http://public.highfidelity.io/scripts/defaultScripts.js"; |
| 117 | 117 | ||
| 118 | void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) { | 118 | void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) { |
| 119 | if (message.size() > 0) { | 119 | QString logMessage = LogHandler::getInstance().printMessage(type, context, message); |
| 120 | QString dateString = QDateTime::currentDateTime().toTimeSpec(Qt::LocalTime).toString(Qt::ISODate); | 120 | |
| 121 | QString formattedMessage = QString("[%1] %2\n").arg(dateString).arg(message); | 121 | if (!logMessage.isEmpty()) { |
| 122 | 122 | Application::getInstance()->getLogger()->addMessage(qPrintable(logMessage)); | |
| 123 | fprintf(stdout, "%s", qPrintable(formattedMessage)); | ||
| 124 | Application::getInstance()->getLogger()->addMessage(qPrintable(formattedMessage)); | ||
| 125 | } | 123 | } |
| 126 | } | 124 | } |
| 127 | 125 | ||