logging: initial log level set by ENV var

This commit is contained in:
Dusan Klinec 2019-04-29 13:11:47 +02:00
parent ff6ce6294b
commit 607b1f8ede
No known key found for this signature in database
GPG key ID: 6337E118CCBCE103

View file

@ -140,7 +140,12 @@ int main(int argc, char *argv[])
// 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 + ")";
// screen settings