diff --git a/src/ConnectionPool.cpp b/src/ConnectionPool.cpp index cfdad9432a..1f46ec8b71 100644 --- a/src/ConnectionPool.cpp +++ b/src/ConnectionPool.cpp @@ -1,9 +1,5 @@ #include "ConnectionPool.h" -#include "Config.h" -#include "Peer.h" -#include "Application.h" -#include "utils.h" #include #include @@ -11,6 +7,13 @@ #include #include +#include "Config.h" +#include "Peer.h" +#include "Application.h" +#include "utils.h" +#include "Log.h" + + // How often to enforce policies. #define POLICY_INTERVAL_SECONDS 5 @@ -163,7 +166,7 @@ void ConnectionPool::policyEnforce() { boost::posix_time::ptime tpNow = boost::posix_time::second_clock::universal_time(); - std::cerr << "policyEnforce: begin: " << tpNow << std::endl; + Log(lsTRACE) << "policyEnforce: begin: " << tpNow; // Cancel any in progrss timer. (void) mPolicyTimer.cancel(); @@ -176,7 +179,7 @@ void ConnectionPool::policyEnforce() tpNext = boost::posix_time::second_clock::universal_time()+boost::posix_time::seconds(POLICY_INTERVAL_SECONDS); - std::cerr << "policyEnforce: schedule : " << tpNext << std::endl; + Log(lsTRACE) << "policyEnforce: schedule : " << tpNext; mPolicyTimer.expires_at(tpNext); mPolicyTimer.async_wait(boost::bind(&ConnectionPool::policyHandler, this, _1));