diff options
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 13 |
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. |