summaryrefslogtreecommitdiffstats
path: root/src/Common/RequestHandlers/StatusRequestHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/RequestHandlers/StatusRequestHandler.cpp')
-rw-r--r--src/Common/RequestHandlers/StatusRequestHandler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Common/RequestHandlers/StatusRequestHandler.cpp b/src/Common/RequestHandlers/StatusRequestHandler.cpp
index bcff6b6..a3f8675 100644
--- a/src/Common/RequestHandlers/StatusRequestHandler.cpp
+++ b/src/Common/RequestHandlers/StatusRequestHandler.cpp
@@ -19,19 +19,18 @@
#include "StatusRequestHandler.h"
#include "../SystemBackend.h"
+#include "../Logger.h"
#include <Net/Connection.h>
#include <Net/Packets/ErrorPacket.h>
#include <Net/Packets/HostStatusPacket.h>
-#include <iostream>
-
namespace Mad {
namespace Common {
namespace RequestHandlers {
void StatusRequestHandler::handlePacket(Net::Connection *connection, const Net::Packet &packet) {
if(packet.getType() != Net::Packet::STATUS) {
- std::cerr << "Received an unexpected packet." << std::endl;
+ Logger::log(Logger::ERROR, "Received an unexpected packet.");
connection->send(Net::Packets::ErrorPacket(Net::Packet::ERROR, packet.getRequestId(), Common::Exception(Common::Exception::UNEXPECTED_PACKET)));
signalFinished().emit();