From 0f7625b5cdbc24ed0fce1e168059118cb025d869 Mon Sep 17 00:00:00 2001 From: Gabriel Russell Date: Thu, 20 Feb 2020 16:05:48 -0500 Subject: SERVER-45567 removing util/log.h where I can o converting some log lines that were missed o fixing some missing includes create mode 100644 src/mongo/transport/ismaster_metrics.cpp --- src/mongo/shell/bench.cpp | 1 - src/mongo/shell/kms_aws.cpp | 1 - src/mongo/shell/shell_utils.cpp | 22 +++++++++++++--------- src/mongo/shell/shell_utils_extended.cpp | 2 +- src/mongo/shell/shell_utils_launcher.cpp | 1 - 5 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src/mongo/shell') diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp index ffa2af16563..68967a7c05c 100644 --- a/src/mongo/shell/bench.cpp +++ b/src/mongo/shell/bench.cpp @@ -44,7 +44,6 @@ #include "mongo/logv2/log.h" #include "mongo/scripting/bson_template_evaluator.h" #include "mongo/stdx/thread.h" -#include "mongo/util/log.h" #include "mongo/util/md5.h" #include "mongo/util/time_support.h" #include "mongo/util/timer.h" diff --git a/src/mongo/shell/kms_aws.cpp b/src/mongo/shell/kms_aws.cpp index 6057e15b66a..9201386d57c 100644 --- a/src/mongo/shell/kms_aws.cpp +++ b/src/mongo/shell/kms_aws.cpp @@ -43,7 +43,6 @@ #include "mongo/shell/kms_gen.h" #include "mongo/util/base64.h" #include "mongo/util/kms_message_support.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/net/sock.h" #include "mongo/util/net/ssl_manager.h" diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp index faa1d52362c..b2b593d1772 100644 --- a/src/mongo/shell/shell_utils.cpp +++ b/src/mongo/shell/shell_utils.cpp @@ -51,6 +51,7 @@ #include "mongo/client/dbclient_base.h" #include "mongo/client/replica_set_monitor.h" #include "mongo/db/hasher.h" +#include "mongo/logv2/log.h" #include "mongo/platform/mutex.h" #include "mongo/platform/random.h" #include "mongo/scripting/engine.h" @@ -59,7 +60,6 @@ #include "mongo/shell/shell_utils_extended.h" #include "mongo/shell/shell_utils_launcher.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/quick_exit.h" #include "mongo/util/text.h" @@ -582,20 +582,24 @@ void ConnectionRegistry::killOperationsOnAllConnections(bool withPrompt) const { if (auto elem = op["client"]) { // mongod currentOp client if (elem.type() != String) { - warning() << "Ignoring operation " << op["opid"].toString(false) - << "; expected 'client' field in currentOp response to have type " - "string, but found " - << typeName(elem.type()); + LOGV2_WARNING(23916, + "Ignoring operation {op_opid_false}; expected 'client' field in " + "currentOp response to have type " + "string, but found {typeName_elem_type}", + "op_opid_false"_attr = op["opid"].toString(false), + "typeName_elem_type"_attr = typeName(elem.type())); continue; } client = elem.str(); } else if (auto elem = op["client_s"]) { // mongos currentOp client if (elem.type() != String) { - warning() << "Ignoring operation " << op["opid"].toString(false) - << "; expected 'client_s' field in currentOp response to have type " - "string, but found " - << typeName(elem.type()); + LOGV2_WARNING(23917, + "Ignoring operation {op_opid_false}; expected 'client_s' field " + "in currentOp response to have type " + "string, but found {typeName_elem_type}", + "op_opid_false"_attr = op["opid"].toString(false), + "typeName_elem_type"_attr = typeName(elem.type())); continue; } client = elem.str(); diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp index 9f25c9a3a41..5d9220486c7 100644 --- a/src/mongo/shell/shell_utils_extended.cpp +++ b/src/mongo/shell/shell_utils_extended.cpp @@ -43,8 +43,8 @@ #include "mongo/scripting/engine.h" #include "mongo/shell/shell_utils.h" #include "mongo/shell/shell_utils_launcher.h" +#include "mongo/util/errno_util.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" #include "mongo/util/md5.hpp" #include "mongo/util/net/socket_utils.h" #include "mongo/util/password.h" diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp index 592eda259d0..d1cdd3e36be 100644 --- a/src/mongo/shell/shell_utils_launcher.cpp +++ b/src/mongo/shell/shell_utils_launcher.cpp @@ -69,7 +69,6 @@ #include "mongo/shell/shell_utils.h" #include "mongo/util/destructor_guard.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/quick_exit.h" #include "mongo/util/scopeguard.h" -- cgit v1.2.1