summaryrefslogtreecommitdiff
path: root/src/mongo/db/session.cpp
diff options
context:
space:
mode:
authorNathan Louie <nathan.louie@10gen.com>2018-08-16 16:18:00 -0400
committerjinichu <jinnybyun@gmail.com>2018-08-16 16:18:00 -0400
commit199963de3d57ffcb1db7acd75911d547a4cd6f31 (patch)
tree27417954c76ece7f2d9035adebb12e51a87d7a41 /src/mongo/db/session.cpp
parent562d076100007c2b130ce4b6f9ec9740463bba7b (diff)
downloadmongo-199963de3d57ffcb1db7acd75911d547a4cd6f31.tar.gz
SERVER-36461 Add 'transaction' identifier to slow transaction log output
(cherry picked from commit 4b6a5591cf912f6cadaf2f1ede5d58ad2bb694c6)
Diffstat (limited to 'src/mongo/db/session.cpp')
-rw-r--r--src/mongo/db/session.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/session.cpp b/src/mongo/db/session.cpp
index 8c2b7c51805..db7981d4671 100644
--- a/src/mongo/db/session.cpp
+++ b/src/mongo/db/session.cpp
@@ -1234,7 +1234,8 @@ void Session::_logSlowTransaction(WithLock wl,
// Log the transaction if its duration is longer than the slowMS command threshold.
if (_singleTransactionStats->getDuration(curTimeMicros64()) >
serverGlobalParams.slowMS * 1000ULL) {
- log(logger::LogComponent::kCommand)
+ log(logger::LogComponent::kTransaction)
+ << "transaction "
<< _transactionInfoForLog(lockStats, terminationCause, readConcernArgs);
}
}