Added logger for outputrequesthandler
This commit is contained in:
@@ -96,6 +96,11 @@ void OutputRequestHandler::handleRequest(HTTPServerRequest &request,
|
|||||||
|
|
||||||
boost::optional<Poco::JSON::Object> OutputRequestHandler::parseRequest(const std::string& item_type, const std::string& item_name, const std::string& action, const std::string& score)
|
boost::optional<Poco::JSON::Object> OutputRequestHandler::parseRequest(const std::string& item_type, const std::string& item_name, const std::string& action, const std::string& score)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
std::string log_msg = "Got request from client to " + action + " " + item_type + " with name " + item_name + " (" + score + ")";
|
||||||
|
|
||||||
|
Poco::Logger::root().information(log_msg);
|
||||||
|
|
||||||
if(item_type == "solenoids")
|
if(item_type == "solenoids")
|
||||||
{
|
{
|
||||||
return parseSolenoid(item_name, action);
|
return parseSolenoid(item_name, action);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include <Poco/JSON/JSON.h>
|
#include <Poco/JSON/JSON.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
#include <Poco/Logger.h>
|
||||||
#include <Poco/JSON/Object.h>
|
#include <Poco/JSON/Object.h>
|
||||||
|
|
||||||
#include "output/OutputDriver.h"
|
#include "output/OutputDriver.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user