diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2020-02-13 11:49:46 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-13 18:16:35 +0000 |
commit | a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761 (patch) | |
tree | 85ac46cd5f4ea6d5134560bf764fb9e6cf11fe4e /src/mongo/util/processinfo.cpp | |
parent | 6df40e01f7b6899affc4536e7e73a35802cabf98 (diff) | |
download | mongo-a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761.tar.gz |
SERVER-45869 automatically converted structured logging
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; } } |