class LogBuffer
Defined at line 23 of file ../../src/developer/forensics/feedback_data/log_buffer.h
Stores up to |capacity| bytes of system log messages, dropping the earliest messages when the
stored messages occupy too much space.
Public Methods
void ~LogBuffer ()
Defined at line 27 of file ../../src/developer/forensics/feedback_data/log_buffer.h
void LogBuffer (StorageSize capacity, RedactorBase * redactor)
Defined at line 35 of file ../../src/developer/forensics/feedback_data/log_buffer.cc
bool Add (LogSink::MessageOr message)
Adds |message| to the buffer and drops messages as required to keep the total size under
|capacity|. Always returns true.
Messages are assumed to be received mostly in order.
Defined at line 46 of file ../../src/developer/forensics/feedback_data/log_buffer.cc
void NotifyInterruption ()
Records the log stream was interrupted and clears the contents.
Defined at line 101 of file ../../src/developer/forensics/feedback_data/log_buffer.cc
std::optional<zx::time_boot> FirstTimestamp ()
Returns std::nullopt if the buffer is empty.
Defined at line 38 of file ../../src/developer/forensics/feedback_data/log_buffer.cc
bool SafeAfterInterruption ()
It's safe continue to writing to a LogBuffer if the log source has been interrupted.
Defined at line 39 of file ../../src/developer/forensics/feedback_data/log_buffer.h
std::optional<zx::time_boot> LastTimestamp ()
Returns std::nullopt if the buffer is empty.
Defined at line 42 of file ../../src/developer/forensics/feedback_data/log_buffer.cc
std::string ToString ()
Defined at line 115 of file ../../src/developer/forensics/feedback_data/log_buffer.cc
void ExecuteAfter (zx::time_boot timestamp, ::fit::closure action)
Executes |action| after a message with a time greater than or equal to |timestamp| is received
or NotifyInterruption is called.
Defined at line 134 of file ../../src/developer/forensics/feedback_data/log_buffer.cc