From: Matthieu Gallien Date: Wed, 2 Oct 2024 13:21:09 +0000 (+0200) Subject: improve debugger logs on Windows to have same content than normal log X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~5^2~145^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=06f7cf4896be5ab62c4d12f9f0f9b76b91405f16;p=nextcloud-desktop.git improve debugger logs on Windows to have same content than normal log makes debugger logs more usefull Signed-off-by: Matthieu Gallien --- diff --git a/src/libsync/logger.cpp b/src/libsync/logger.cpp index 66c853559..5e84be48a 100644 --- a/src/libsync/logger.cpp +++ b/src/libsync/logger.cpp @@ -123,24 +123,7 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString #if defined Q_OS_WIN && ((defined NEXTCLOUD_DEV && NEXTCLOUD_DEV) || defined QT_DEBUG) // write logs to Output window of Visual Studio { - QString prefix; - switch (type) { - case QtDebugMsg: - break; - case QtInfoMsg: - break; - case QtWarningMsg: - prefix = QStringLiteral("[WARNING] "); - break; - case QtCriticalMsg: - prefix = QStringLiteral("[CRITICAL ERROR] "); - break; - case QtFatalMsg: - prefix = QStringLiteral("[FATAL ERROR] "); - break; - } - auto msgW = QString(prefix + message).toStdWString(); - msgW.append(L"\n"); + const auto msgW = QStringLiteral("%1\n").arg(msg).toStdWString(); OutputDebugString(msgW.c_str()); } #endif