Enumerations

enum class EncodingVersion
Name Value
kForTesting 0
kIdentity 1
kLz4 2

Defined at line 14 of file ../../src/developer/forensics/feedback_data/system_log_recorder/encoding/version.h

enum class ReaderError : std::uint8_t
Name Value
kIoError 0
kDecompressionError 1

Defined at line 19 of file ../../src/developer/forensics/feedback_data/system_log_recorder/reader.h

Records

Functions

  • std::string ShutdownMessage (zx::time_boot now)

    Returns the formatted string indicating the system is shutting down and doesn't guarantee any

    more logs.

    Defined at line 15 of file ../../src/developer/forensics/feedback_data/system_log_recorder/shutdown_message.cc

  • cobalt::PreviousBootEncodingVersion ToCobalt (EncodingVersion version)

    Defined at line 11 of file ../../src/developer/forensics/feedback_data/system_log_recorder/encoding/version.cc

  • int main ()

    Defined at line 34 of file ../../src/developer/forensics/feedback_data/system_log_recorder/main.cc

  • std::string EncodeSize (uint16_t size)

    Encodes the size of the encoded chunk as a fixed-length string that is easily decodable. This

    must be kept in sync with DecodeSize().

    The inline keyword avoids breaking the one definition rule.

    Defined at line 50 of file ../../src/developer/forensics/feedback_data/system_log_recorder/encoding/lz4_utils.h

  • uint16_t DecodeSize (const char ** data_ptr)

    Reads the uint16_t value from the first two consecutive characters starting at the *data_ptr

    position and updates the *data_ptr position in order to read subsequent data.

    The inline keyword avoids breaking the one definition rule.

    Note: we do not cast directly into uint16_t to avoid alignment issues.

    Defined at line 63 of file ../../src/developer/forensics/feedback_data/system_log_recorder/encoding/lz4_utils.h

  • fit::result<ReaderError, std::string> Concatenate (const std::string & logs_dir, StorageSize max_decompressed_size, Decoder * decoder, float * compression_ratio)

    Reads the encoded logs in |logs_dir|, decodes them using |decoder|, sorts log messages

    chronologically by timestamp, and aggregates consecutive repeated messages. Calculates the

    resulting |compression_ratio|.

    Returns the processed log string on success, or a ReaderError on failure.

    Defined at line 238 of file ../../src/developer/forensics/feedback_data/system_log_recorder/reader.cc