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 authored and backportbot[bot] committed Oct 4, 2024
1 parent 5e251e6 commit 337e4a3
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 @@ -121,24 +121,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 337e4a3

Please sign in to comment.