summaryrefslogtreecommitdiff
path: root/src/mongo/util/procparser.cpp
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2020-02-20 16:05:48 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-21 20:12:44 +0000
commit0f7625b5cdbc24ed0fce1e168059118cb025d869 (patch)
tree3ea90b71ed2510e220140626b351f6e998d2d8b7 /src/mongo/util/procparser.cpp
parent3463ea25afcbf2c07b96f043904961b5c0f04474 (diff)
downloadmongo-0f7625b5cdbc24ed0fce1e168059118cb025d869.tar.gz
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
Diffstat (limited to 'src/mongo/util/procparser.cpp')
-rw-r--r--src/mongo/util/procparser.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/mongo/util/procparser.cpp b/src/mongo/util/procparser.cpp
index 78e1a244155..45c8effbf4f 100644
--- a/src/mongo/util/procparser.cpp
+++ b/src/mongo/util/procparser.cpp
@@ -50,7 +50,7 @@
#include "mongo/base/status_with.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/bsonobjbuilder.h"
-#include "mongo/util/log.h"
+#include "mongo/logv2/log.h"
#include "mongo/util/scopeguard.h"
#include "mongo/util/str.h"
#include "mongo/util/text.h"
@@ -659,8 +659,10 @@ bool isInterestingDisk(const boost::filesystem::path& path) {
}
if (ec) {
- warning() << "Error checking directory '" << blockDevicePath.generic_string()
- << "': " << ec.message();
+ LOGV2_WARNING(23912,
+ "Error checking directory '{blockDevicePath_generic_string}': {ec_message}",
+ "blockDevicePath_generic_string"_attr = blockDevicePath.generic_string(),
+ "ec_message"_attr = ec.message());
return false;
}
@@ -679,13 +681,19 @@ std::vector<std::string> findPhysicalDisks(StringData sysBlockPath) {
auto statusSysBlock = boost::filesystem::status(sysBlockPathStr, ec);
if (ec) {
- warning() << "Error checking directory '" << sysBlockPathStr << "': " << ec.message();
+ LOGV2_WARNING(23913,
+ "Error checking directory '{sysBlockPathStr}': {ec_message}",
+ "sysBlockPathStr"_attr = sysBlockPathStr,
+ "ec_message"_attr = ec.message());
return {};
}
if (!(boost::filesystem::exists(statusSysBlock) &&
boost::filesystem::is_directory(statusSysBlock))) {
- warning() << "Could not find directory '" << sysBlockPathStr << "': " << ec.message();
+ LOGV2_WARNING(23914,
+ "Could not find directory '{sysBlockPathStr}': {ec_message}",
+ "sysBlockPathStr"_attr = sysBlockPathStr,
+ "ec_message"_attr = ec.message());
return {};
}
@@ -696,8 +704,10 @@ std::vector<std::string> findPhysicalDisks(StringData sysBlockPath) {
// disk device. It does not contain disk partitions.
boost::filesystem::directory_iterator di(sysBlockPathStr, ec);
if (ec) {
- warning() << "Error getting directory iterator '" << sysBlockPathStr
- << "': " << ec.message();
+ LOGV2_WARNING(23915,
+ "Error getting directory iterator '{sysBlockPathStr}': {ec_message}",
+ "sysBlockPathStr"_attr = sysBlockPathStr,
+ "ec_message"_attr = ec.message());
return {};
}