summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan <thejonathanma@gmail.com>2018-12-19 11:24:31 -0800
committerBen Caimano <ben.caimano@10gen.com>2019-03-22 12:56:43 -0400
commit5bf7bd3ba234b851d7563bbcb799f748ee4dfc47 (patch)
tree1145895f289821d91b8240492577b02c0e0bdf8f
parentcaf6b67b53038191e9a84fa838fc5a7ad0cf0c95 (diff)
downloadmongo-5bf7bd3ba234b851d7563bbcb799f748ee4dfc47.tar.gz
SERVER-37722 Check for quiet flag when logging connection end message
-rw-r--r--src/mongo/transport/service_entry_point_impl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/transport/service_entry_point_impl.cpp b/src/mongo/transport/service_entry_point_impl.cpp
index 2dc1562ffdb..a988293b0ea 100644
--- a/src/mongo/transport/service_entry_point_impl.cpp
+++ b/src/mongo/transport/service_entry_point_impl.cpp
@@ -169,7 +169,7 @@ void ServiceEntryPointImpl::startSession(transport::SessionHandle session) {
<< connectionCount << word << " now open)";
}
- ssm->setCleanupHook([ this, ssmIt, session = std::move(session) ] {
+ ssm->setCleanupHook([ this, ssmIt, quiet, session = std::move(session) ] {
size_t connectionCount;
auto remote = session->remote();
{
@@ -179,9 +179,11 @@ void ServiceEntryPointImpl::startSession(transport::SessionHandle session) {
_currentConnections.store(connectionCount);
}
_shutdownCondition.notify_one();
- const auto word = (connectionCount == 1 ? " connection"_sd : " connections"_sd);
- log() << "end connection " << remote << " (" << connectionCount << word << " now open)";
+ if (!quiet) {
+ const auto word = (connectionCount == 1 ? " connection"_sd : " connections"_sd);
+ log() << "end connection " << remote << " (" << connectionCount << word << " now open)";
+ }
});
auto ownership = ServiceStateMachine::Ownership::kOwned;