Rework log messages

Former-commit-id: eac93c0fd78fdf353e940d08df3cabf0b962a3e2
This commit is contained in:
brindosch
2016-03-23 17:40:34 +01:00
parent dcd518b6cc
commit fa66c3b2b5
27 changed files with 147 additions and 147 deletions

View File

@@ -13,14 +13,14 @@ JsonServer::JsonServer(Hyperion *hyperion, uint16_t port) :
{
if (!_server.listen(QHostAddress::Any, port))
{
throw std::runtime_error("Json server could not bind to port");
throw std::runtime_error("JSONSERVER ERROR: could not bind to port");
}
QList<MessageForwarder::JsonSlaveAddress> list = _hyperion->getForwarder()->getJsonSlaves();
for ( int i=0; i<list.size(); i++ )
{
if ( list.at(i).addr == QHostAddress::LocalHost && list.at(i).port == port ) {
throw std::runtime_error("Loop between proto server and forwarder detected. Fix your config!");
throw std::runtime_error("JSONSERVER ERROR: Loop between proto server and forwarder detected. Fix your config!");
}
}
@@ -49,7 +49,7 @@ void JsonServer::newConnection()
if (socket != nullptr)
{
std::cout << "New json connection" << std::endl;
std::cout << "JSONSERVER INFO: New connection" << std::endl;
JsonClientConnection * connection = new JsonClientConnection(socket, _hyperion);
_openConnections.insert(connection);
@@ -60,7 +60,7 @@ void JsonServer::newConnection()
void JsonServer::closedConnection(JsonClientConnection *connection)
{
std::cout << "Json connection closed" << std::endl;
std::cout << "JSONSERVER INFO: Connection closed" << std::endl;
_openConnections.remove(connection);
// schedule to delete the connection object