aboutsummaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/command_parser_executor.cpp7
-rw-r--r--src/daemon/command_server.cpp2
-rw-r--r--src/daemon/rpc_command_executor.cpp2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index 395157869..af46453cd 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -125,12 +125,17 @@ bool t_command_parser_executor::print_blockchain_info(const std::vector<std::str
bool t_command_parser_executor::set_log_level(const std::vector<std::string>& args)
{
- if(args.size() != 1)
+ if(args.size() > 1)
{
std::cout << "use: set_log [<log_level_number_0-4> | <categories>]" << std::endl;
return true;
}
+ if (args.empty())
+ {
+ return m_executor.set_log_categories("+");
+ }
+
uint16_t l = 0;
if(epee::string_tools::get_xtype_from_string(l, args[0]))
{
diff --git a/src/daemon/command_server.cpp b/src/daemon/command_server.cpp
index b9f503c6b..3f1543857 100644
--- a/src/daemon/command_server.cpp
+++ b/src/daemon/command_server.cpp
@@ -141,7 +141,7 @@ t_command_server::t_command_server(
m_command_lookup.set_handler(
"set_log"
, std::bind(&t_command_parser_executor::set_log_level, &m_parser, p::_1)
- , "set_log <level>|<categories> - Change current loglevel, <level> is a number 0-4"
+ , "set_log <level>|<{+,-,}categories> - Change current log level/categories, <level> is a number 0-4"
);
m_command_lookup.set_handler(
"diff"
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp
index 3cd32ec2f..ef593237c 100644
--- a/src/daemon/rpc_command_executor.cpp
+++ b/src/daemon/rpc_command_executor.cpp
@@ -599,7 +599,7 @@ bool t_rpc_command_executor::set_log_categories(const std::string &categories) {
}
}
- tools::success_msg_writer() << "Log categories are now " << categories;
+ tools::success_msg_writer() << "Log categories are now " << res.categories;
return true;
}