Index: src/log-utils.cc |
diff --git a/src/log-utils.cc b/src/log-utils.cc |
index b31864be4695c752ebe210ad1ac77282c377a855..f280bfbe28a2a3ecc853cf5620b1a42d39fca5a0 100644 |
--- a/src/log-utils.cc |
+++ b/src/log-utils.cc |
@@ -310,6 +310,18 @@ void LogMessageBuilder::AppendDetailed(String* str, bool show_impl_info) { |
} |
+void LogMessageBuilder::AppendStringPart(const char* str, int len) { |
+ if (pos_ + len > Log::kMessageBufferSize) { |
+ len = Log::kMessageBufferSize - pos_; |
+ ASSERT(len >= 0); |
+ if (len == 0) return; |
+ } |
+ strncpy(Log::message_buffer_ + pos_, str, len); |
+ pos_ += len; |
+ ASSERT(pos_ <= Log::kMessageBufferSize); |
+} |
+ |
+ |
bool LogMessageBuilder::StoreInCompressor(LogRecordCompressor* compressor) { |
return compressor->Store(Vector<const char>(Log::message_buffer_, pos_)); |
} |