diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-10-13 12:36:49 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-10-13 12:36:49 -0500 |
| commit | 8c5891e28a49e99f1bb2c68e667fda7d72e8e2c7 (patch) | |
| tree | 56801483b4d7bc8a4d1e2cd4188a34f46ae27f90 /src/main/main.cpp | |
| parent | 61c0e15404f6a145f2ac7d9b1061f55bf57edd68 (diff) | |
| parent | 3c28ecef93949224f68d301f71d47296cc67e2f5 (diff) | |
| download | monzero-gui-8c5891e28a49e99f1bb2c68e667fda7d72e8e2c7.tar.gz monzero-gui-8c5891e28a49e99f1bb2c68e667fda7d72e8e2c7.tar.xz monzero-gui-8c5891e28a49e99f1bb2c68e667fda7d72e8e2c7.zip | |
Merge pull request #3141
3c28ece Logger: runtime log config, no logs till a user selects wallet mode (xiphon)
Diffstat (limited to 'src/main/main.cpp')
| -rw-r--r-- | src/main/main.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp index 90bd5106..e13c6198 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -61,7 +61,6 @@ #include "model/SubaddressModel.h" #include "SubaddressAccount.h" #include "model/SubaddressAccountModel.h" -#include "wallet/api/wallet2_api.h" #include "Logger.h" #include "MainApp.h" #include "qt/downloader.h" @@ -269,10 +268,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw Monero::Utils::onStartup(); - // Log settings - const QString logPath = QDir::toNativeSeparators(getLogPath(parser.value(logPathOption))); - Monero::Wallet::init(argv[0], "monero-wallet-gui", logPath.toStdString().c_str(), true); - qInstallMessageHandler(messageHandler); + Logger logger(app, parser.value(logPathOption)); // loglevel is configured in main.qml. Anything lower than // qWarning is not shown here unless MONERO_LOG_LEVEL env var is set @@ -281,7 +277,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw if (logLevelOk && logLevel >= 0 && logLevel <= Monero::WalletManagerFactory::LogLevel_Max){ Monero::WalletManagerFactory::setLogLevel(logLevel); } - qWarning().noquote() << "app startd" << "(log: " + logPath + ")"; + qWarning().noquote() << "app startd" << "(log: " + logger.logFilePath() + ")"; if (parser.isSet(verifyUpdateOption)) { @@ -446,14 +442,14 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw engine.addImageProvider(QLatin1String("qrcode"), new QRCodeImageProvider()); + engine.rootContext()->setContextProperty("logger", &logger); + engine.rootContext()->setContextProperty("mainApp", &app); engine.rootContext()->setContextProperty("IPC", ipc); engine.rootContext()->setContextProperty("qtRuntimeVersion", qVersion()); - engine.rootContext()->setContextProperty("walletLogPath", logPath); - engine.rootContext()->setContextProperty("tailsUsePersistence", TailsOS::usePersistence); // Exclude daemon manager from IOS |
