diff options
Diffstat (limited to 'absl/log/log_entry.h')
-rw-r--r-- | absl/log/log_entry.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/absl/log/log_entry.h b/absl/log/log_entry.h index 30114c33..41de6e66 100644 --- a/absl/log/log_entry.h +++ b/absl/log/log_entry.h @@ -169,6 +169,15 @@ class LogEntry final { return text_message_with_prefix_and_newline_and_nul_.data(); } + // Returns a serialized protobuf holding the operands streamed into this + // log message. The message definition is not yet published. + // + // The buffer does not outlive the entry; if you need the data later, you must + // copy them. + absl::string_view encoded_message() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + return encoding_; + } + // LogEntry::stacktrace() // // Optional stacktrace, e.g. for `FATAL` logs and failed `CHECK`s. @@ -198,6 +207,7 @@ class LogEntry final { tid_t tid_; absl::Span<const char> text_message_with_prefix_and_newline_and_nul_; size_t prefix_len_; + absl::string_view encoding_; std::string stacktrace_; friend class log_internal::LogEntryTestPeer; |