Skip to content

Commit

Permalink
improve debugger logs on Windows to have same content than normal log
Browse files Browse the repository at this point in the history
makes debugger logs more usefull

Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Oct 3, 2024
1 parent 3cd138f commit 164725e
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 164725e

Please sign in to comment.