wallet: do not print log settings when unset

Coverity 199721
This commit is contained in:
moneromooo-monero 2019-07-01 11:52:55 +00:00
parent 6335509727
commit c8709fe52f
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -206,7 +206,10 @@ namespace wallet_args
if (!command_line::is_arg_defaulted(vm, arg_log_level)) if (!command_line::is_arg_defaulted(vm, arg_log_level))
MINFO("Setting log level = " << command_line::get_arg(vm, arg_log_level)); MINFO("Setting log level = " << command_line::get_arg(vm, arg_log_level));
else else
MINFO("Setting log levels = " << getenv("MONERO_LOGS")); {
const char *logs = getenv("MONERO_LOGS");
MINFO("Setting log levels = " << (logs ? logs : "<default>"));
}
MINFO(wallet_args::tr("Logging to: ") << log_path); MINFO(wallet_args::tr("Logging to: ") << log_path);
Print(print) << boost::format(wallet_args::tr("Logging to %s")) % log_path; Print(print) << boost::format(wallet_args::tr("Logging to %s")) % log_path;