Commit d1eb7bfc authored by Marco De Marco's avatar Marco De Marco
Browse files

Log messages refactored

parent bc60c45e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -199,8 +199,6 @@ void Client::handleReadResponseHeader(const boost::system::error_code& errorCode
    {
        boost::uint32_t bodySize = decodeHeader(m_readBuff);

        DEBUG_STREAM << "Client::handleReadResponseHeader() SIZE: " << bodySize << endl;

        startReadResponseBody(bodySize);
    }
    else
+0 −13
Original line number Diff line number Diff line
@@ -61,19 +61,6 @@ void DBManager::connect() throw(soci::soci_error)
    m_session_sp->open(soci::mysql, connection.str());
}

//==============================================================================
//      DBManager::isConnected()
//==============================================================================
bool DBManager::isConnected()
{
    DEBUG_STREAM << "DBManager::isConnect()" << endl;

    if(m_session_sp->get_backend() == NULL)
        return false;
    else
        return true;
}

//==============================================================================
//      DBManager::disconnect()
//==============================================================================
+0 −2
Original line number Diff line number Diff line
@@ -52,8 +52,6 @@ public:

    virtual void connect() throw(soci::soci_error);

    virtual bool isConnected();

    virtual void disconnect();

protected:
+3 −4
Original line number Diff line number Diff line
@@ -574,6 +574,8 @@ void MetadataImporter::off()
void MetadataImporter::checkIfFileExists(std::string fileName)
    throw(std::invalid_argument)
{
    DEBUG_STREAM << "MetadataImporter::checkIfFileExists()  - " << device_name << endl;

    boost::filesystem::path path(fileName);

    if(!boost::filesystem::exists(path))
@@ -584,10 +586,7 @@ void MetadataImporter::checkIfFileExists(std::string fileName)
        throw std::invalid_argument(errorStream.str());
    }

    #ifdef VERBOSE_DEBUG
        INFO_STREAM << "FILE: " << fileName << " -> OK" << endl;
        INFO_STREAM << "-------------------------------------------------" << endl;
    #endif
    DEBUG_STREAM << "FILE: " << fileName << " -> OK" << endl;
}

/*----- PROTECTED REGION END -----*/	//	MetadataImporter::namespace_ending
+11 −2
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ void PlainClient::startConnect(boost::asio::ip::tcp::resolver::iterator endPoint

    if(endPointIterator != boost::asio::ip::tcp::resolver::iterator())
    {
        INFO_STREAM << "PlainClient::startConnect() connecting to "
        DEBUG_STREAM << "PlainClient::startConnect() connecting to "
            << endPointIterator->endpoint() << endl;

        m_plainSocket.async_connect(endPointIterator->endpoint(),
@@ -95,6 +95,8 @@ void PlainClient::handleConnect(const boost::system::error_code& errorCode,

    if(!errorCode)
    {
        INFO_STREAM << m_plainSocket.remote_endpoint() << " CONNECTED" << endl;

        startWriteRequest();
    }
    else
@@ -119,7 +121,8 @@ void PlainClient::startWriteRequest()

    boost::uint32_t bodySize = request_sp->ByteSize();

    DEBUG_STREAM << "PlainClient::startRequest() SIZE " << bodySize << endl;
    INFO_STREAM << m_plainSocket.remote_endpoint()
        << " <<<< " << bodySize << " BYTE" << endl;

    std::vector<boost::uint8_t> writeBuff;
    writeBuff.resize(HEADER_SIZE + bodySize);
@@ -159,6 +162,9 @@ void PlainClient::startReadResponseBody(boost::uint32_t bodySize)
{
    DEBUG_STREAM << "PlainClient::startReadResponseBody()" << endl;

    INFO_STREAM << m_plainSocket.remote_endpoint()
        << " >>>> " << bodySize << " BYTE" << endl;

    m_readBuff.resize(HEADER_SIZE + bodySize);

    boost::asio::mutable_buffers_1 mutableBuffer =
@@ -176,9 +182,12 @@ void PlainClient::closeConnection()
{
        DEBUG_STREAM << "PlainClient::closeConnection()" << endl;

        INFO_STREAM << m_plainSocket.remote_endpoint() << " DISCONNECTED" << endl;

        boost::system::error_code errorCode;

        m_plainSocket.shutdown(boost::asio::ip::tcp::socket::shutdown_both, errorCode);

        m_plainSocket.close(errorCode);
}

Loading