From 3bcda54518c4914c1b934d7d12b7219d1ee7d941 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 10 Jan 2016 20:32:38 +0100 Subject: Improve ManagementServer request logging --- src/ManagementServer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ManagementServer.cpp b/src/ManagementServer.cpp index 2b501be..7194689 100644 --- a/src/ManagementServer.cpp +++ b/src/ManagementServer.cpp @@ -264,10 +264,11 @@ void ManagementServer::handle_message(zmq::message_t& zmq_message) std::stringstream answer; std::string data((char*)zmq_message.data(), zmq_message.size()); - try { - etiLog.level(info) << "RC: Accepted"; + etiLog.level(debug) << "ManagementServer: '" << data << "' request"; + try { if (data == "info") { + answer << "{ \"service\": \"" << PACKAGE_NAME << " " << @@ -300,6 +301,7 @@ void ManagementServer::handle_message(zmq::message_t& zmq_message) boost::property_tree::json_parser::write_json(answer, m_pt); } else { + etiLog.level(warn) << "ManagementServer: Invalid request '" << data << "'"; answer << "Invalid command"; } -- cgit v1.2.3