diff options
author | Scott Hernandez <scotthernandez@tart.local> | 2016-03-01 16:15:53 -0500 |
---|---|---|
committer | Scott Hernandez <scotthernandez@tart.local> | 2016-03-27 11:45:02 -0400 |
commit | 664295c8ca3152c48da572c770aa08c39e517bf4 (patch) | |
tree | 6f3db3803970f5ddf55eb20ce3ee0eb28076164b /src/mongo/unittest/unittest.cpp | |
parent | 9be485ea5e262d7d69a5486cc60fce247b5ae57f (diff) | |
download | mongo-664295c8ca3152c48da572c770aa08c39e517bf4.tar.gz |
SERVER-23010: general cleanup and test fixture changes
Diffstat (limited to 'src/mongo/unittest/unittest.cpp')
-rw-r--r-- | src/mongo/unittest/unittest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/unittest/unittest.cpp b/src/mongo/unittest/unittest.cpp index dfe1ddd2c10..ef523832b1e 100644 --- a/src/mongo/unittest/unittest.cpp +++ b/src/mongo/unittest/unittest.cpp @@ -214,6 +214,13 @@ void Test::stopCapturingLogMessages() { checked_cast<StringVectorAppender*>(_captureAppender.get())->disable(); _isCapturingLogMessages = false; } +void Test::printCapturedLogLines() const { + log() << "****************************** Captured Lines (start) *****************************"; + std::for_each(getCapturedLogMessages().begin(), + getCapturedLogMessages().end(), + [](std::string line) { log() << line; }); + log() << "****************************** Captured Lines (end) ******************************"; +} int64_t Test::countLogLinesContaining(const std::string& needle) { return std::count_if(getCapturedLogMessages().begin(), |