feat(logger): Also log to stderr (appears in Xcode) from macOS debug builds.

Signed-off-by: Iva Horn <iva.horn@icloud.com>
This commit is contained in:
Iva Horn 2025-07-29 14:59:00 +02:00
parent 585bba3807
commit 4f46ce542f

View File

@ -117,7 +117,12 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString
// write logs to Output window of Visual Studio
{
const auto msgW = QStringLiteral("%1\n").arg(msg).toStdWString();
OutputDebugString(msgW.c_str());
OutputDebugString(msgW.c());
}
#elif defined Q_OS_MAC && defined QT_DEBUG
// write logs to Xcode console (stderr)
{
std::cerr << msg.toStdString() << std::endl;
}
#endif
{