summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/sharding_logging.cpp
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2020-03-18 17:40:13 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-23 22:34:38 +0000
commit2debd8d3f087a50c3c7ec6d3d99ba6b056a24eab (patch)
tree50e10550a5ad53b5117e68c2260588161dd1fb10 /src/mongo/db/s/sharding_logging.cpp
parent65f447b27e9b3db0315dd52d97d9e26fa462916c (diff)
downloadmongo-2debd8d3f087a50c3c7ec6d3d99ba6b056a24eab.tar.gz
SERVER-46799 Update sharding log lines to adhere to LOGV2 style guide
Diffstat (limited to 'src/mongo/db/s/sharding_logging.cpp')
-rw-r--r--src/mongo/db/s/sharding_logging.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/mongo/db/s/sharding_logging.cpp b/src/mongo/db/s/sharding_logging.cpp
index 621b176a1ab..c3e67354c9a 100644
--- a/src/mongo/db/s/sharding_logging.cpp
+++ b/src/mongo/db/s/sharding_logging.cpp
@@ -81,8 +81,9 @@ Status ShardingLogging::logAction(OperationContext* opCtx,
_actionLogCollectionCreated.store(1);
} else {
LOGV2(22078,
- "couldn't create config.actionlog collection:{causedBy_result}",
- "causedBy_result"_attr = causedBy(result));
+ "Couldn't create config.actionlog collection: {error}",
+ "Couldn't create config.actionlog collection",
+ "error"_attr = result);
return result;
}
}
@@ -109,8 +110,9 @@ Status ShardingLogging::logChangeChecked(OperationContext* opCtx,
_changeLogCollectionCreated.store(1);
} else {
LOGV2(22079,
- "couldn't create config.changelog collection:{causedBy_result}",
- "causedBy_result"_attr = causedBy(result));
+ "Couldn't create config.changelog collection: {error}",
+ "Couldn't create config.changelog collection",
+ "error"_attr = result);
return result;
}
}
@@ -149,9 +151,10 @@ Status ShardingLogging::_log(OperationContext* opCtx,
BSONObj changeLogBSON = changeLog.toBSON();
LOGV2(22080,
- "about to log metadata event into {logCollName}: {changeLogBSON}",
- "logCollName"_attr = logCollName,
- "changeLogBSON"_attr = redact(changeLogBSON));
+ "About to log metadata event into {namespace}: {event}",
+ "About to log metadata event",
+ "namespace"_attr = logCollName,
+ "event"_attr = redact(changeLogBSON));
const NamespaceString nss("config", logCollName);
Status result = Grid::get(opCtx)->catalogClient()->insertConfigDocument(
@@ -160,10 +163,11 @@ Status ShardingLogging::_log(OperationContext* opCtx,
if (!result.isOK()) {
LOGV2_WARNING(22081,
"Error encountered while logging config change with ID [{changeId}] into "
- "collection {logCollName}: {result}",
+ "collection {namespace}: {error}",
+ "Error encountered while logging config change",
"changeId"_attr = changeId,
- "logCollName"_attr = logCollName,
- "result"_attr = redact(result));
+ "namespace"_attr = logCollName,
+ "error"_attr = redact(result));
}
return result;