From 84fb3a360f2bd4f081e1b1ec2e597443d378783b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 4 Feb 2008 21:26:12 +0000 Subject: cout to clog --- anytun.cpp | 4 ---- syncClientSocket.cpp | 10 +++++----- syncQueue.cpp | 5 ----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/anytun.cpp b/anytun.cpp index 2056f02..ebff073 100644 --- a/anytun.cpp +++ b/anytun.cpp @@ -360,12 +360,8 @@ int main(int argc, char* argv[]) ConnectToList connect_to = opt.getConnectTo(); SyncQueue queue; - cLog.msg(Log::PRIO_DEBUG) << "pre create conn"; - if(opt.getRemoteAddr() != "") createConnection(opt.getRemoteAddr(),opt.getRemotePort(),cl,opt.getSeqWindowSize(), queue); - - cLog.msg(Log::PRIO_DEBUG) << "post create conn"; ThreadParam p(opt, dev, *src, cl, queue,*(new OptionConnectTo())); diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp index 1403ed4..76fd40d 100644 --- a/syncClientSocket.cpp +++ b/syncClientSocket.cpp @@ -6,11 +6,12 @@ #include +#include "log.h" //#include "connectionParam.h" #include "Sockets/Utility.h" #include "syncClientSocket.h" #include "buffer.h" -//#include "log.h" + SyncClientSocket::SyncClientSocket(ISocketHandler& h,ConnectionList & cl) :TcpSocket(h),cl_(cl) @@ -26,14 +27,13 @@ SyncClientSocket::SyncClientSocket(ISocketHandler& h,ConnectionList & cl) bool SyncClientSocket::OnConnectRetry() { - std::cout << "SyncClientSocket::OnConnectRetry" << std::endl; return true; } void SyncClientSocket::OnReconnect() { - std::cout << "SyncClientSocket::OnReconnect" << std::endl; + cLog.msg(Log::PRIO_NOTICE) << "reconnected with " << GetRemoteHostname() << std::endl; // ... //Send("Welcome back\r\n"); } @@ -43,7 +43,7 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len) //void SyncClientSocket::OnLine(const std::string& line) { std::stringstream iss; - std::cout << "recieved sync inforamtaion:"<< std::endl; + cLog.msg(Log::PRIO_NOTICE) << "recieved sync inforamtaion from " << GetRemoteHostname() << std::endl; for(size_t index=0;index> scom; u_int16_t mux = scom.getMux(); const ConnectionParam & conn = cl_.getConnection(mux)->second; - std::cout << "sync connection #"<