diff options
author | Jonathan <thejonathanma@gmail.com> | 2018-12-19 11:24:31 -0800 |
---|---|---|
committer | Ben Caimano <ben.caimano@10gen.com> | 2019-03-22 11:17:19 -0400 |
commit | 7861aff0e2befcab400a9cd5a6ad59a38e6a8bee (patch) | |
tree | b3d2ffceab0f83a05895705da0c19429e1b068b3 | |
parent | a1c7c798168f13284a486153dde4b335735cea0a (diff) | |
download | mongo-7861aff0e2befcab400a9cd5a6ad59a38e6a8bee.tar.gz |
SERVER-37722 Check for quiet flag when logging connection end message
-rw-r--r-- | src/mongo/transport/service_entry_point_impl.cpp | 8 |
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 a4935cb0fdc..3cb3e71a589 100644 --- a/src/mongo/transport/service_entry_point_impl.cpp +++ b/src/mongo/transport/service_entry_point_impl.cpp @@ -168,7 +168,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(); { @@ -178,9 +178,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; |