mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-02 15:53:27 +01:00
wallet: fix set_log not handling 0,xxx style settings
This commit is contained in:
parent
37eebd9dcf
commit
995969b190
@ -851,21 +851,7 @@ bool simple_wallet::set_log(const std::vector<std::string> &args)
|
|||||||
fail_msg_writer() << tr("usage: set_log <log_level_number_0-4> | <categories>");
|
fail_msg_writer() << tr("usage: set_log <log_level_number_0-4> | <categories>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
uint16_t l = 0;
|
mlog_set_log(args[0].c_str());
|
||||||
if(epee::string_tools::get_xtype_from_string(l, args[0]))
|
|
||||||
{
|
|
||||||
if(4 < l)
|
|
||||||
{
|
|
||||||
fail_msg_writer() << tr("wrong number range, use: set_log <log_level_number_0-4>");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
mlog_set_log_level(l);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mlog_set_categories(args.front().c_str());
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
|
@ -494,7 +494,7 @@ void WalletManagerFactory::setLogLevel(int level)
|
|||||||
|
|
||||||
void WalletManagerFactory::setLogCategories(const std::string &categories)
|
void WalletManagerFactory::setLogCategories(const std::string &categories)
|
||||||
{
|
{
|
||||||
mlog_set_categories(categories.c_str());
|
mlog_set_log(categories.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user