summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/TcpConnector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/TcpConnector.cpp')
-rw-r--r--cpp/src/Ice/TcpConnector.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/cpp/src/Ice/TcpConnector.cpp b/cpp/src/Ice/TcpConnector.cpp
index 1147b5268b2..c00d6789667 100644
--- a/cpp/src/Ice/TcpConnector.cpp
+++ b/cpp/src/Ice/TcpConnector.cpp
@@ -12,7 +12,7 @@
#include <Ice/TcpTransceiver.h>
#include <Ice/Instance.h>
#include <Ice/TraceLevels.h>
-#include <Ice/Logger.h>
+#include <Ice/LoggerUtil.h>
#include <Ice/Network.h>
#include <Ice/Exception.h>
@@ -25,9 +25,8 @@ IceInternal::TcpConnector::connect(int timeout)
{
if (_traceLevels->network >= 2)
{
- ostringstream s;
- s << "trying to establish tcp connection to " << toString();
- _logger->trace(_traceLevels->networkCat, s.str());
+ Trace out(_logger, _traceLevels->networkCat);
+ out << "trying to establish tcp connection to " << toString();
}
SOCKET fd = createSocket(false);
@@ -35,9 +34,8 @@ IceInternal::TcpConnector::connect(int timeout)
if (_traceLevels->network >= 1)
{
- ostringstream s;
- s << "tcp connection established\n" << fdToString(fd);
- _logger->trace(_traceLevels->networkCat, s.str());
+ Trace out(_logger, _traceLevels->networkCat);
+ out << "tcp connection established\n" << fdToString(fd);
}
return new TcpTransceiver(_instance, fd);