From 7182b9a6b5071bcd1aa7e4187f62a571c205a9fd Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 30 Nov 2015 01:14:37 -0800 Subject: [PATCH] Upgrade TCPConnector messages from DEBUG to ERROR / INFO. This makes the client a lot more "chatty" but also a lot more informative as to what's actually going on connection-wise. --- src/tcpsockets/TCPConnector.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tcpsockets/TCPConnector.cpp b/src/tcpsockets/TCPConnector.cpp index b548000444..deea22ee83 100644 --- a/src/tcpsockets/TCPConnector.cpp +++ b/src/tcpsockets/TCPConnector.cpp @@ -100,7 +100,7 @@ std::unique_ptr TCPConnector::connect(const char* server, if (timeout == 0) { int sd = socket(AF_INET, SOCK_STREAM, 0); if (::connect(sd, (struct sockaddr*)&address, sizeof(address)) != 0) { - DEBUG("connect() to " << server << " port " << port << " failed: " << SocketStrerror()); + ERROR("connect() to " << server << " port " << port << " failed: " << SocketStrerror()); return nullptr; } return std::unique_ptr(new TCPStream(sd, &address)); @@ -139,15 +139,15 @@ std::unique_ptr TCPConnector::connect(const char* server, len = sizeof(int); getsockopt(sd, SOL_SOCKET, SO_ERROR, (char*)(&valopt), &len); if (valopt) { - DEBUG("select() to " << server << " port " << port << " error " << valopt << " - " << SocketStrerror(valopt)); + ERROR("select() to " << server << " port " << port << " error " << valopt << " - " << SocketStrerror(valopt)); } // connection established else result = 0; } else - DEBUG("connect() timed out"); + INFO("connect() to " << server << " port " << port << " timed out"); } else - DEBUG("connect() to " << server << " port " << port << " error " << SocketErrno() << " - " << SocketStrerror()); + ERROR("connect() to " << server << " port " << port << " error " << SocketErrno() << " - " << SocketStrerror()); } // Return socket to blocking mode