summaryrefslogtreecommitdiff
path: root/src/mongo/client/sdam/topology_description_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/sdam/topology_description_test.cpp')
-rw-r--r--src/mongo/client/sdam/topology_description_test.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/client/sdam/topology_description_test.cpp b/src/mongo/client/sdam/topology_description_test.cpp
index 1b6181562ae..3f580a9d415 100644
--- a/src/mongo/client/sdam/topology_description_test.cpp
+++ b/src/mongo/client/sdam/topology_description_test.cpp
@@ -26,6 +26,8 @@
* exception statement from all source files in the program, then also delete
* it in the license file.
*/
+#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault
+
#include "mongo/client/sdam/sdam_test_base.h"
#include "mongo/client/sdam/topology_description.h"
@@ -34,7 +36,9 @@
#include "mongo/client/sdam/server_description.h"
#include "mongo/client/sdam/server_description_builder.h"
#include "mongo/db/wire_version.h"
+#include "mongo/logv2/log.h"
#include "mongo/unittest/death_test.h"
+#include "mongo/util/log.h"
namespace mongo {
template std::ostream& operator<<(std::ostream& os,
@@ -143,8 +147,9 @@ TEST_F(TopologyDescriptionTestFixture, ShouldOnlyAllowSingleAndRsNoPrimaryWithSe
topologyTypes.end());
for (const auto topologyType : topologyTypes) {
- unittest::log() << "Check TopologyType " << toString(topologyType)
- << " with setName value.";
+ LOGV2(20217,
+ "Check TopologyType {topologyType} with setName value.",
+ "topologyType"_attr = toString(topologyType));
ASSERT_THROWS_CODE(
SdamConfiguration(kOneServer, topologyType, mongo::Seconds(10), kSetName),
DBException,