summary refs log tree commit diff
path: root/pkgs/applications/altcoins/monero-gui/move-log-file.patch
blob: 74f817d8135000f56d2215c01fc3d7041d5e4494 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/main.cpp b/main.cpp
index 79223c0..e80b317 100644
--- a/main.cpp
+++ b/main.cpp
@@ -115,6 +115,9 @@ int main(int argc, char *argv[])
     QCommandLineOption logPathOption(QStringList() << "l" << "log-file",
         QCoreApplication::translate("main", "Log to specified file"),
         QCoreApplication::translate("main", "file"));
+    logPathOption.setDefaultValue(
+        QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+        + "/monero-wallet-gui.log");
     parser.addOption(logPathOption);
     parser.addHelpOption();
     parser.process(app);
diff --git a/Logger.cpp b/Logger.cpp
index 660bafc..dae24d4 100644
--- a/Logger.cpp
+++ b/Logger.cpp
@@ -15,7 +15,7 @@ static const QString default_name = "monero-wallet-gui.log";
 #elif defined(Q_OS_MAC)
     static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0) + "/Library/Logs";
 #else // linux + bsd
-    static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0);
+    static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).at(0);
 #endif