aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 8ec59e2b..e74dada3 100644
--- a/main.cpp
+++ b/main.cpp
@@ -149,7 +149,12 @@ int main(int argc, char *argv[])
QString accountName = getAccountName();
// loglevel is configured in main.qml. Anything lower than
- // qWarning is not shown here.
+ // qWarning is not shown here unless MONERO_LOG_LEVEL env var is set
+ bool logLevelOk;
+ int logLevel = qEnvironmentVariableIntValue("MONERO_LOG_LEVEL", &logLevelOk);
+ if (logLevelOk && logLevel >= 0 && logLevel <= Monero::WalletManagerFactory::LogLevel_Max){
+ Monero::WalletManagerFactory::setLogLevel(logLevel);
+ }
qWarning().noquote() << "app startd" << "(log: " + logPath + ")";
#ifdef Q_OS_LINUX