config()->set(Config::hideBalance, toggled);
m_ctx->updateBalance();
});
+ connect(ui->checkBox_disableLogging, &QCheckBox::toggled, [this](bool toggled){
+ config()->set(Config::disableLogging, toggled);
+ WalletManager::instance()->setLogLevel(toggled ? -1 : config()->get(Config::logLevel).toInt());
+ });
connect(ui->closeButton, &QDialogButtonBox::accepted, this, &Settings::close);
ui->checkBox_multiBroadcast->setChecked(config()->get(Config::multiBroadcast).toBool());
ui->checkBox_externalLink->setChecked(config()->get(Config::warnOnExternalLink).toBool());
ui->checkBox_hideBalance->setChecked(config()->get(Config::hideBalance).toBool());
+ ui->checkBox_disableLogging->setChecked(config()->get(Config::disableLogging).toBool());
// setup comboboxes
this->setupSkinCombobox();
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="checkBox_disableLogging">
+ <property name="text">
+ <string>Do not write log files to disk</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="tab_node">
bool logLevelFromEnv;
int logLevel = qEnvironmentVariableIntValue("MONERO_LOG_LEVEL", &logLevelFromEnv);
+ if (!logLevelFromEnv) {
+ logLevel = 0;
+ }
+ config()->set(Config::logLevel, logLevel);
- if (parser.isSet("quiet"))
+ if (parser.isSet("quiet") || config()->get(Config::disableLogging).toBool()) {
+ qWarning() << "Logging is disabled";
WalletManager::instance()->setLogLevel(-1);
- else if (logLevelFromEnv && logLevel >= 0 && logLevel <= Monero::WalletManagerFactory::LogLevel_Max)
+ }
+ else if (logLevelFromEnv && logLevel >= 0 && logLevel <= Monero::WalletManagerFactory::LogLevel_Max) {
Monero::WalletManagerFactory::setLogLevel(logLevel);
+ }
// Setup wallet directory
QString walletDir = config()->get(Config::walletDirectory).toString();
{Config::firstRun, {QS("firstRun"), true}},
{Config::warnOnStagenet,{QS("warnOnStagenet"), true}},
{Config::warnOnTestnet,{QS("warnOnTestnet"), true}},
+ {Config::logLevel,{QS("logLevel"), 0}},
{Config::homeWidget,{QS("homeWidget"), "ccs"}},
{Config::donateBeg,{QS("donateBeg"), 1}},
{Config::multiBroadcast, {QS("multiBroadcast"), true}},
{Config::warnOnExternalLink,{QS("warnOnExternalLink"), true}},
{Config::hideBalance, {QS("hideBalance"), false}},
+ {Config::disableLogging, {QS("disableLogging"), false}},
{Config::blockExplorer,{QS("blockExplorer"), "exploremonero.com"}},
{Config::redditFrontend, {QS("redditFrontend"), "old.reddit.com"}},
firstRun,
warnOnStagenet,
warnOnTestnet,
+ logLevel,
homeWidget,
donateBeg,
multiBroadcast,
warnOnExternalLink,
hideBalance,
+ disableLogging,
blockExplorer,
redditFrontend,