From bbd3a6f4961f3470382e32cbbac922f3d2d73310 Mon Sep 17 00:00:00 2001 From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Date: Fri, 27 Sep 2019 14:15:56 -0400 Subject: [PATCH] debug: save log file to appdata local Change-Id: Ia4acacf54465aa7214ee16f28520bd5f6c5a9f02 --- main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 27410b9..04f9047 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:")) { -- GitLab