diff options
Diffstat (limited to 'src/mongo/util/processinfo.cpp')
-rw-r--r-- | src/mongo/util/processinfo.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mongo/util/processinfo.cpp b/src/mongo/util/processinfo.cpp index 3428d0907d0..9501f0eefcf 100644 --- a/src/mongo/util/processinfo.cpp +++ b/src/mongo/util/processinfo.cpp @@ -39,6 +39,7 @@ #include <fstream> #include <iostream> +#include "mongo/logv2/log.h" #include "mongo/util/log.h" namespace mongo { @@ -61,11 +62,14 @@ public: if (!out.good()) { auto errAndStr = errnoAndDescription(); if (errAndStr.first == 0) { - log() << "ERROR: Cannot write pid file to " << path.string() - << ": Unable to determine OS error"; + LOGV2(23329, + "ERROR: Cannot write pid file to {path_string}: Unable to determine OS error", + "path_string"_attr = path.string()); } else { - log() << "ERROR: Cannot write pid file to " << path.string() << ": " - << errAndStr.second; + LOGV2(23330, + "ERROR: Cannot write pid file to {path_string}: {errAndStr_second}", + "path_string"_attr = path.string(), + "errAndStr_second"_attr = errAndStr.second); } } else { boost::system::error_code ec; @@ -75,8 +79,10 @@ public: boost::filesystem::group_read | boost::filesystem::others_read, ec); if (ec) { - log() << "Could not set permissions on pid file " << path.string() << ": " - << ec.message(); + LOGV2(23331, + "Could not set permissions on pid file {path_string}: {ec_message}", + "path_string"_attr = path.string(), + "ec_message"_attr = ec.message()); return false; } } |