summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2021-02-16 01:15:53 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-18 04:03:22 +0000
commitfad9de4ece9f5399acc804f206e40621930be5af (patch)
tree0a1dd3202e0d8ad0cc93a58c03d3519fba2abd23 /src/mongo/db
parent61df6d3c9a0a6658613d2ef9bcfb28bd14224acf (diff)
downloadmongo-fad9de4ece9f5399acc804f206e40621930be5af.tar.gz
SERVER-54596 remove 1-arg shouldLog function (an ODR violation)
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/matcher/schema/json_schema_parser.cpp3
-rw-r--r--src/mongo/db/repl/isself.cpp4
-rw-r--r--src/mongo/db/service_entry_point_common.cpp2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp2
4 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/matcher/schema/json_schema_parser.cpp b/src/mongo/db/matcher/schema/json_schema_parser.cpp
index c972c05c602..df73cced7a7 100644
--- a/src/mongo/db/matcher/schema/json_schema_parser.cpp
+++ b/src/mongo/db/matcher/schema/json_schema_parser.cpp
@@ -1870,7 +1870,8 @@ StatusWithMatchExpression JSONSchemaParser::parse(
"schema"_attr = schema.jsonString(JsonStringFormat::LegacyStrict));
try {
auto translation = _parse(expCtx, ""_sd, schema, allowedFeatures, ignoreUnknownKeywords);
- if (shouldLog(logv2::LogSeverity::Debug(5)) && translation.isOK()) {
+ if (shouldLog(MONGO_LOGV2_DEFAULT_COMPONENT, logv2::LogSeverity::Debug(5)) &&
+ translation.isOK()) {
LOGV2_DEBUG(20729,
5,
"Translated schema match expression: {expression}",
diff --git a/src/mongo/db/repl/isself.cpp b/src/mongo/db/repl/isself.cpp
index 98d4f1cef78..adb93ac45a9 100644
--- a/src/mongo/db/repl/isself.cpp
+++ b/src/mongo/db/repl/isself.cpp
@@ -149,7 +149,7 @@ std::vector<std::string> getAddrsForHost(const std::string& iporhost,
}
}
- if (shouldLog(logv2::LogSeverity::Debug(2))) {
+ if (shouldLog(MONGO_LOGV2_DEFAULT_COMPONENT, logv2::LogSeverity::Debug(2))) {
LOGV2_DEBUG(21205,
2,
"getAddrsForHost()",
@@ -397,7 +397,7 @@ std::vector<std::string> getBoundAddrs(const bool ipv6enabled) {
#endif // defined(_WIN32)
- if (shouldLog(logv2::LogSeverity::Debug(2))) {
+ if (shouldLog(MONGO_LOGV2_DEFAULT_COMPONENT, logv2::LogSeverity::Debug(2))) {
LOGV2_DEBUG(21206, 2, "getBoundAddrs()", "result"_attr = out);
}
return out;
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index 164a07dbb2d..0abb6b54bc9 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -1958,7 +1958,7 @@ void receivedKillCursors(OperationContext* opCtx, const Message& m) {
const char* cursorArray = dbmessage.getArray(n);
int found = runOpKillCursors(opCtx, static_cast<size_t>(n), cursorArray);
- if (shouldLog(logv2::LogSeverity::Debug(1)) || found != n) {
+ if (shouldLog(MONGO_LOGV2_DEFAULT_COMPONENT, logv2::LogSeverity::Debug(1)) || found != n) {
LOGV2_DEBUG(21967,
found == n ? 1 : 0,
"killCursors: found {found} of {numCursors}",
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
index 738c2d432e8..6e47bba47fc 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
@@ -565,7 +565,7 @@ void WiredTigerRecoveryUnit::_txnOpen() {
_ensureSession();
// Only start a timer for transaction's lifetime if we're going to log it.
- if (shouldLog(kSlowTransactionSeverity)) {
+ if (shouldLog(MONGO_LOGV2_DEFAULT_COMPONENT, kSlowTransactionSeverity)) {
_timer.reset(new Timer());
}
WT_SESSION* session = _session->getSession();