diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-02-13 16:55:02 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-14 23:22:38 +0000 |
commit | 7a91c2823d5c0f94ad0d0e6bb5e830df0276da2a (patch) | |
tree | f16c5131af6c8059aee67c7d23cdfd03ae1defe2 /src/mongo/db | |
parent | 05feebc53d0ad88574cfba9bbc7640d2244f9756 (diff) | |
download | mongo-7a91c2823d5c0f94ad0d0e6bb5e830df0276da2a.tar.gz |
SERVER-45138 Add MONGO_CONFIG_JSON_LOG_DEFAULT define to use JSON logs by default
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/curop.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog_applier_impl.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/s/transaction_coordinator.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/transaction_participant.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 6842bec55fa..385b53141d1 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -490,7 +490,7 @@ bool CurOp::completeAndLogOperation(OperationContext* opCtx, _debug.prepareConflictDurationMillis = duration_cast<Milliseconds>(prepareConflictDurationMicros); - if (serverGlobalParams.logFormat == logv2::LogFormat::kJson) { + if (logV2IsJson(serverGlobalParams.logFormat)) { logv2::DynamicAttributes attr; _debug.report(opCtx, (lockerInfo ? &lockerInfo->stats : nullptr), &attr); LOGV2(51803, "slow query", attr); diff --git a/src/mongo/db/repl/oplog_applier_impl.cpp b/src/mongo/db/repl/oplog_applier_impl.cpp index e801962d0df..6d9586b8f0c 100644 --- a/src/mongo/db/repl/oplog_applier_impl.cpp +++ b/src/mongo/db/repl/oplog_applier_impl.cpp @@ -113,7 +113,7 @@ Status finishAndLogApply(OperationContext* opCtx, Milliseconds(opDuration), Milliseconds(serverGlobalParams.slowMS)) .first) { - if (serverGlobalParams.logFormat == logv2::LogFormat::kJson) { + if (logV2IsJson(serverGlobalParams.logFormat)) { logv2::DynamicAttributes attrs; diff --git a/src/mongo/db/s/transaction_coordinator.cpp b/src/mongo/db/s/transaction_coordinator.cpp index f3a6696db93..03c21e4ce5f 100644 --- a/src/mongo/db/s/transaction_coordinator.cpp +++ b/src/mongo/db/s/transaction_coordinator.cpp @@ -422,7 +422,7 @@ void TransactionCoordinator::_done(Status status) { void TransactionCoordinator::_logSlowTwoPhaseCommit( const txn::CoordinatorCommitDecision& decision) { - if (serverGlobalParams.logFormat == logv2::LogFormat::kJson) { + if (logV2IsJson(serverGlobalParams.logFormat)) { logv2::DynamicAttributes attrs; BSONObjBuilder parametersBuilder; diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp index 26162528a7c..c8180467c20 100644 --- a/src/mongo/db/transaction_participant.cpp +++ b/src/mongo/db/transaction_participant.cpp @@ -1989,7 +1989,7 @@ void TransactionParticipant::Participant::_logSlowTransaction( opDuration, Milliseconds(serverGlobalParams.slowMS)) .first) { - if (serverGlobalParams.logFormat == logv2::LogFormat::kJson) { + if (logV2IsJson(serverGlobalParams.logFormat)) { logv2::DynamicAttributes attr; _transactionInfoForLog(opCtx, lockStats, terminationCause, readConcernArgs, &attr); LOGV2_OPTIONS(51802, {logv2::LogComponent::kTransaction}, "transaction", attr); |