aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Koller <[email protected]>2017-05-03 20:12:16 +0200
committerMartin Koller <[email protected]>2017-05-03 20:12:16 +0200
commit0d57181be3887a3462566dd7ca8ac585640deb2d (patch)
tree4b0ddda0c168fbd3e9c611ce009e436e59c2b524
parent2ff9e523ac7972b84ef9369d55fe669701b6112f (diff)
make log file name unique
Differential Revision: https://phabricator.kde.org/D5664
-rw-r--r--src/core/connection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/connection.cpp b/src/core/connection.cpp
index 551b921..56fe8c2 100644
--- a/src/core/connection.cpp
+++ b/src/core/connection.cpp
@@ -49,8 +49,9 @@ Connection::Connection(ConnectionType connType, const QByteArray &sessionId, QOb
const QByteArray sessionLogFile = qgetenv("AKONADI_SESSION_LOGFILE");
if (!sessionLogFile.isEmpty()) {
- mLogFile = new QFile(QStringLiteral("%1.%2.%3-%4").arg(QString::fromLatin1(sessionLogFile))
+ mLogFile = new QFile(QStringLiteral("%1.%2.%3.%4-%5").arg(QString::fromLatin1(sessionLogFile))
.arg(QString::number(QApplication::applicationPid()))
+ .arg(QString::number(reinterpret_cast<qulonglong>(this), 16))
.arg(QString::fromLatin1(mSessionId.replace('/', '_')))
.arg(connType == CommandConnection ? QStringLiteral("Cmd") : QStringLiteral("Ntf")));
if (!mLogFile->open(QIODevice::WriteOnly | QIODevice::Truncate)) {