aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-10-02 23:28:59 +0400
committerRiccardo Spagni <ric@spagni.net>2017-10-02 23:28:59 +0400
commit3bab2676ec05ebd1f3d031c4fcdf7512412ccf05 (patch)
tree95a484e2981461b10f4371d4b45573890804c04f /src/rpc
parentMerge pull request #2506 (diff)
parentLog categories can now be added to and removed from (diff)
downloadmonero-3bab2676ec05ebd1f3d031c4fcdf7512412ccf05.tar.xz
Merge pull request #2512
792ba4f0 Log categories can now be added to and removed from (moneromooo-monero) 48f92eb6 easylogging++: add categories getter (moneromooo-monero) f35afe62 epee: factor log level/categories setting (moneromooo-monero)
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp1
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 9730cdf46..76272ad6c 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -831,6 +831,7 @@ namespace cryptonote
bool core_rpc_server::on_set_log_categories(const COMMAND_RPC_SET_LOG_CATEGORIES::request& req, COMMAND_RPC_SET_LOG_CATEGORIES::response& res)
{
mlog_set_log(req.categories.c_str());
+ res.categories = mlog_get_categories();
res.status = CORE_RPC_STATUS_OK;
return true;
}
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index ecf546bb0..85ac2ca30 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -981,8 +981,11 @@ namespace cryptonote
struct response
{
std::string status;
+ std::string categories;
+
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
+ KV_SERIALIZE(categories)
END_KV_SERIALIZE_MAP()
};
};