diff options
Diffstat (limited to 'src/mongo/unittest/unittest.h')
-rw-r--r-- | src/mongo/unittest/unittest.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mongo/unittest/unittest.h b/src/mongo/unittest/unittest.h index ebd63872978..30ff41a6971 100644 --- a/src/mongo/unittest/unittest.h +++ b/src/mongo/unittest/unittest.h @@ -569,19 +569,17 @@ protected: * Gets a vector of strings, one log line per string, captured since * the last call to startCapturingLogMessages() in this test. */ - const std::vector<std::string>& getCapturedLogMessages() const { - return _capturedLogMessages; - } + const std::vector<std::string>& getCapturedTextFormatLogMessages() const; /** * Returns the number of collected log lines containing "needle". */ - int64_t countLogLinesContaining(const std::string& needle); + int64_t countTextFormatLogLinesContaining(const std::string& needle); /** * Prints the captured log lines. */ - void printCapturedLogLines() const; + void printCapturedTextFormatLogLines() const; private: /** @@ -589,10 +587,9 @@ private: */ virtual void _doTest() = 0; - bool _isCapturingLogMessages; - std::vector<std::string> _capturedLogMessages; - logger::MessageLogDomain::AppenderHandle _captureAppenderHandle; - std::unique_ptr<logger::MessageLogDomain::EventAppender> _captureAppender; + + class CaptureLogs; + std::unique_ptr<CaptureLogs> _captureLogs; }; /** |