diff --git a/main.cpp b/main.cpp index 27410b9e361b3d2c9e6b3a6f57ce09a6d81e740a..04f90479ff020a82daead305bca4f7cfd7fa7fb2 100644 --- a/main.cpp +++ b/main.cpp @@ -220,7 +220,11 @@ main(int argc, char* argv[]) splash->hide(); LRCInstance::subscribeToDebugReceived(); - QFile debugFile(qApp->applicationDirPath() + "/" + "jami.log"); + QDir logPath(QStandardPaths::writableLocation( + QStandardPaths::AppLocalDataLocation)); + // since logPath will be .../Ring, we use cdUp to remove it. + logPath.cdUp(); + QFile debugFile(logPath.absolutePath() + "/jami/jami.log"); for (auto string : QCoreApplication::arguments()) { if (string.startsWith("jami:")) {