summaryrefslogtreecommitdiff
path: root/src/mongo/logger/logstream_builder.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-12-18 10:39:47 -0500
committerRamon Fernandez <ramon@mongodb.com>2016-01-29 13:29:36 -0500
commit452c6c7ec27a73840cc465a07420fb599c42d24a (patch)
treef4bbab899fea9ea6e912c0d99016ff2737a665ef /src/mongo/logger/logstream_builder.cpp
parentc96e8cacf35cf327ba7061cc1aaba997a566a300 (diff)
downloadmongo-452c6c7ec27a73840cc465a07420fb599c42d24a.tar.gz
SERVER-21959 Do not truncate stack traces in log messages.
(cherry picked from commit 7e7ea93facc494fbc393f7170d50b371fbf5f9f0)
Diffstat (limited to 'src/mongo/logger/logstream_builder.cpp')
-rw-r--r--src/mongo/logger/logstream_builder.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/logger/logstream_builder.cpp b/src/mongo/logger/logstream_builder.cpp
index aa5d9d63eac..2577704aad0 100644
--- a/src/mongo/logger/logstream_builder.cpp
+++ b/src/mongo/logger/logstream_builder.cpp
@@ -102,7 +102,8 @@ LogstreamBuilder::LogstreamBuilder(LogstreamBuilder&& other)
_component(std::move(other._component)),
_baseMessage(std::move(other._baseMessage)),
_os(std::move(other._os)),
- _tee(std::move(other._tee)) {}
+ _tee(std::move(other._tee)),
+ _isTruncatable(other._isTruncatable) {}
LogstreamBuilder& LogstreamBuilder::operator=(LogstreamBuilder&& other) {
_domain = std::move(other._domain);
@@ -112,6 +113,7 @@ LogstreamBuilder& LogstreamBuilder::operator=(LogstreamBuilder&& other) {
_baseMessage = std::move(other._baseMessage);
_os = std::move(other._os);
_tee = std::move(other._tee);
+ _isTruncatable = std::move(other._isTruncatable);
return *this;
}
@@ -123,6 +125,7 @@ LogstreamBuilder::~LogstreamBuilder() {
_baseMessage += _os->str();
MessageEventEphemeral message(
Date_t::now(), _severity, _component, _contextName, _baseMessage);
+ message.setIsTruncatable(_isTruncatable);
_domain->append(message);
if (_tee) {
_os->str("");