summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2016-07-27 10:02:49 -0400
committerAndy Schwerin <schwerin@mongodb.com>2016-07-29 17:23:29 -0400
commit0d45c4825ae6a4241c9741cdf95e26863c380255 (patch)
treeadcc5966ec113840efa8e901ba7bcd2da0572b3f /src
parent9380a1c12a19a061eaafabb5f6b9e87f16a28179 (diff)
downloadmongo-0d45c4825ae6a4241c9741cdf95e26863c380255.tar.gz
SERVER-25167 Increase logging on connection failure in NetworkInterfaceASIO.
Diffstat (limited to 'src')
-rw-r--r--src/mongo/executor/async_stream_common.cpp2
-rw-r--r--src/mongo/executor/network_interface_asio_command.cpp6
-rw-r--r--src/mongo/executor/network_interface_asio_connect.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/executor/async_stream_common.cpp b/src/mongo/executor/async_stream_common.cpp
index 0b858d623a4..f029607b472 100644
--- a/src/mongo/executor/async_stream_common.cpp
+++ b/src/mongo/executor/async_stream_common.cpp
@@ -39,7 +39,7 @@ namespace executor {
void logCloseFailed(std::error_code ec) {
invariant(ec);
- LOG(1) << "failed to close stream: " << ec.message();
+ log() << "failed to close stream: " << ec.message();
}
void logFailureInSetStreamNonBlocking(std::error_code ec) {
diff --git a/src/mongo/executor/network_interface_asio_command.cpp b/src/mongo/executor/network_interface_asio_command.cpp
index 99f702c4b99..c0aa346fd6e 100644
--- a/src/mongo/executor/network_interface_asio_command.cpp
+++ b/src/mongo/executor/network_interface_asio_command.cpp
@@ -289,7 +289,7 @@ void NetworkInterfaceASIO::_completeOperation(AsyncOp* op, const ResponseStatus&
MONGO_ASIO_INVARIANT(!resp.isOK(), "Failed to connect in setup", op);
// If we fail during connection, we won't be able to access any of op's members after
// calling finish(), so we return here.
- LOG(1) << "Failed to connect to " << op->request().target << " - " << resp.getStatus();
+ log() << "Failed to connect to " << op->request().target << " - " << resp.getStatus();
_numFailedOps.fetchAndAdd(1);
op->finish(resp);
return;
@@ -300,8 +300,8 @@ void NetworkInterfaceASIO::_completeOperation(AsyncOp* op, const ResponseStatus&
MONGO_ASIO_INVARIANT(!resp.isOK(), "In refresh, but did not fail to heartbeat", op);
// If we fail during heartbeating, we won't be able to access any of op's members after
// calling finish(), so we return here.
- LOG(1) << "Failed to heartbeat to " << op->request().target << " - "
- << redact(resp.getStatus());
+ log() << "Failed asio heartbeat to " << op->request().target << " - "
+ << redact(resp.getStatus());
_numFailedOps.fetchAndAdd(1);
op->finish(resp);
return;
diff --git a/src/mongo/executor/network_interface_asio_connect.cpp b/src/mongo/executor/network_interface_asio_connect.cpp
index 4bda92b42b9..ffd392e15c7 100644
--- a/src/mongo/executor/network_interface_asio_connect.cpp
+++ b/src/mongo/executor/network_interface_asio_connect.cpp
@@ -76,7 +76,7 @@ void NetworkInterfaceASIO::AsyncConnection::setServerProtocols(rpc::ProtocolSet
}
void NetworkInterfaceASIO::_connect(AsyncOp* op) {
- LOG(1) << "Connecting to " << op->request().target.toString();
+ log() << "Connecting to " << op->request().target.toString();
tcp::resolver::query query(op->request().target.host(),
std::to_string(op->request().target.port()));