diff options
Diffstat (limited to 'src/Net/Connection.cpp')
-rw-r--r-- | src/Net/Connection.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp index 81f4c64..fabbd12 100644 --- a/src/Net/Connection.cpp +++ b/src/Net/Connection.cpp @@ -19,7 +19,7 @@ #include "Connection.h" -#include <Core/Logger.h> +#include <Core/Application.h> #include <cstring> #include <boost/bind.hpp> @@ -35,7 +35,7 @@ Connection::~Connection() { void Connection::handleHandshake(const boost::system::error_code& error) { if(error) { - Core::Logger::logf("Error: %s", error.message().c_str()); + application->logf("Error: %s", error.message().c_str()); // TODO Error handling doDisconnect(); @@ -61,7 +61,7 @@ void Connection::handleShutdown(const boost::system::error_code& error) { boost::lock_guard<boost::shared_mutex> lock(connectionLock); if(error) { - Core::Logger::logf(Core::Logger::VERBOSE, "Shutdown error: %s", error.message().c_str()); + application->logf(Core::LoggerBase::VERBOSE, "Shutdown error: %s", error.message().c_str()); } _setState(DISCONNECTED); @@ -110,7 +110,7 @@ void Connection::handleDataReceive(const std::vector<boost::uint8_t> &data) { void Connection::handleRead(const boost::system::error_code& error, std::size_t bytes_transferred, std::size_t length, const boost::function1<void, const std::vector<boost::uint8_t>& > ¬ify) { if(error || (bytes_transferred+received) < length) { - Core::Logger::logf(Core::Logger::VERBOSE, "Read error: %s", error.message().c_str()); + application->logf(Core::LoggerBase::VERBOSE, "Read error: %s", error.message().c_str()); // TODO Error doDisconnect(); @@ -183,7 +183,7 @@ void Connection::handleWrite(const boost::system::error_code& error, std::size_t } if(error) { - Core::Logger::logf(Core::Logger::VERBOSE, "Write error: %s", error.message().c_str()); + application->logf(Core::LoggerBase::VERBOSE, "Write error: %s", error.message().c_str()); // TODO Error doDisconnect(); |