diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-02-04 14:43:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-04 14:43:28 +0100 |
commit | d2fd0fd8e896e3d5dc0449ae719fdaa7d27968a5 (patch) | |
tree | c9382926b4e2c00611e9249313f35bb7290f6171 /launcher | |
parent | 74a875bdce056d554bb7d4a0d8a57cc9561ef397 (diff) | |
parent | 35a62d97875360132d8d67c0e6e6d69dd48481f5 (diff) | |
download | PrismLauncher-d2fd0fd8e896e3d5dc0449ae719fdaa7d27968a5.tar.gz PrismLauncher-d2fd0fd8e896e3d5dc0449ae719fdaa7d27968a5.tar.bz2 PrismLauncher-d2fd0fd8e896e3d5dc0449ae719fdaa7d27968a5.zip |
Merge pull request #802 from KosmX/develop
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/Application.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 387f735c..0d3b086f 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -77,6 +77,7 @@ #include "ApplicationMessage.h" #include <iostream> +#include <mutex> #include <QAccessible> #include <QCommandLineParser> @@ -150,6 +151,9 @@ namespace { /** This is used so that we can output to the log file in addition to the CLI. */ void appDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) { + static std::mutex loggerMutex; + const std::lock_guard<std::mutex> lock(loggerMutex); // synchronized, QFile logFile is not thread-safe + QString out = qFormatLogMessage(type, context, msg); out += QChar::LineFeed; |