summaryrefslogtreecommitdiff
path: root/src/mongo/s/mongos_options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/mongos_options.cpp')
-rw-r--r--src/mongo/s/mongos_options.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mongo/s/mongos_options.cpp b/src/mongo/s/mongos_options.cpp
index 918344bedce..f77696af1fe 100644
--- a/src/mongo/s/mongos_options.cpp
+++ b/src/mongo/s/mongos_options.cpp
@@ -45,7 +45,6 @@
#include "mongo/db/server_options_server_helpers.h"
#include "mongo/logv2/log.h"
#include "mongo/s/version_mongos.h"
-#include "mongo/util/log.h"
#include "mongo/util/net/socket_utils.h"
#include "mongo/util/options_parser/startup_options.h"
#include "mongo/util/str.h"
@@ -156,11 +155,16 @@ Status storeMongosOptions(const moe::Environment& params) {
}
if (!resolvedSomeSeedSever) {
if (!hostbyname(configdbConnectionString.getValue().getSetName().c_str()).empty()) {
- warning() << "The replica set name \""
- << str::escape(configdbConnectionString.getValue().getSetName())
- << "\" resolves as a host name, but none of the servers in the seed list do. "
- "Did you reverse the replica set name and the seed list in "
- << str::escape(configdbConnectionString.getValue().toString()) << "?";
+ LOGV2_WARNING(24131,
+ "The replica set name "
+ "\"{str_escape_configdbConnectionString_getValue_getSetName}\" resolves "
+ "as a host name, but none of the servers in the seed list do. "
+ "Did you reverse the replica set name and the seed list in "
+ "{str_escape_configdbConnectionString_getValue}?",
+ "str_escape_configdbConnectionString_getValue_getSetName"_attr =
+ str::escape(configdbConnectionString.getValue().getSetName()),
+ "str_escape_configdbConnectionString_getValue"_attr =
+ str::escape(configdbConnectionString.getValue().toString()));
}
}
@@ -170,8 +174,9 @@ Status storeMongosOptions(const moe::Environment& params) {
configdbConnectionString.getValue().getSetName()};
if (mongosGlobalParams.configdbs.getServers().size() < 3) {
- warning() << "Running a sharded cluster with fewer than 3 config servers should only be "
- "done for testing purposes and is not recommended for production.";
+ LOGV2_WARNING(24132,
+ "Running a sharded cluster with fewer than 3 config servers should only be "
+ "done for testing purposes and is not recommended for production.");
}
return Status::OK();