summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.cpp
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2020-02-18 09:30:37 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-18 21:22:37 +0000
commit2b61edc505e45acc7927aee40e4e8abeb99420cd (patch)
tree3de213a9ac3db322e919143f902b2e91c455735b /src/mongo/db/curop.cpp
parent80512e580834b70c97f1facf3cd78da97be643c1 (diff)
downloadmongo-2b61edc505e45acc7927aee40e4e8abeb99420cd.tar.gz
SERVER-46219 Unittests always uses text even if the server uses JSON.
Temporary until we work on fixing the tests. Transaction slow query log logs with both new and old log statement
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r--src/mongo/db/curop.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 385b53141d1..7a4dcec9f1e 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -490,13 +490,12 @@ bool CurOp::completeAndLogOperation(OperationContext* opCtx,
_debug.prepareConflictDurationMillis =
duration_cast<Milliseconds>(prepareConflictDurationMicros);
- if (logV2IsJson(serverGlobalParams.logFormat)) {
- logv2::DynamicAttributes attr;
- _debug.report(opCtx, (lockerInfo ? &lockerInfo->stats : nullptr), &attr);
- LOGV2(51803, "slow query", attr);
- } else {
- log(component) << _debug.report(opCtx, (lockerInfo ? &lockerInfo->stats : nullptr));
- }
+ logv2::DynamicAttributes attr;
+ _debug.report(opCtx, (lockerInfo ? &lockerInfo->stats : nullptr), &attr);
+ LOGV2(51803, "slow query", attr);
+
+ // TODO SERVER-46219: Log also with old log system to not break unit tests
+ log(component) << _debug.report(opCtx, (lockerInfo ? &lockerInfo->stats : nullptr));
}
// Return 'true' if this operation should also be added to the profiler.