3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/altcoins/monero-gui/move-log-file.patch

39 lines
1.3 KiB
Diff
Raw Normal View History

2018-01-26 23:07:07 +00:00
diff --git a/main.cpp b/main.cpp
2018-03-31 10:41:11 +01:00
index c03b160..a8ea263 100644
2018-01-26 23:07:07 +00:00
--- a/main.cpp
+++ b/main.cpp
2018-03-31 10:41:11 +01:00
@@ -80,14 +80,16 @@ int main(int argc, char *argv[])
2018-01-26 23:07:07 +00:00
// qDebug() << "High DPI auto scaling - enabled";
//#endif
- // Log settings
- Monero::Wallet::init(argv[0], "monero-wallet-gui");
-// qInstallMessageHandler(messageHandler);
-
MainApp app(argc, argv);
qDebug() << "app startd";
+ // Log settings
+ QString logfile =
+ QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ + "/monero-wallet-gui.log";
+ Monero::Wallet::init(argv[0], logfile.toUtf8().constData());
+
2018-03-31 10:41:11 +01:00
app.setApplicationName("monero-core");
app.setOrganizationDomain("getmonero.org");
app.setOrganizationName("monero-project");
2018-01-26 23:07:07 +00:00
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
2018-03-31 10:41:11 +01:00
index 74649ce..fe1efc6 100644
2018-01-26 23:07:07 +00:00
--- a/src/libwalletqt/Wallet.cpp
+++ b/src/libwalletqt/Wallet.cpp
2018-03-31 10:41:11 +01:00
@@ -729,7 +729,7 @@ QString Wallet::getWalletLogPath() const
#ifdef Q_OS_MACOS
return QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0) + "/Library/Logs/" + filename;
#else
- return QCoreApplication::applicationDirPath() + "/" + filename;
+ return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + filename;
#endif
2018-01-26 23:07:07 +00:00
}