Merge pull request #2128

607b1f8 logging: initial log level set by ENV var (ph4r05)
This commit is contained in:
luigi1111 2019-04-30 15:27:03 -05:00
commit 060a718b0c
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -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