syslog_runtime::LogBufferBuilder

#include <log_message_impl.h>

Constructs a LogBuffer.

Summary

Constructors and Destructors

LogBufferBuilder(fuchsia_logging::LogSeverity severity)

Public functions

Build()
Builds the LogBuffer.
WithCondition(cpp17::string_view condition)
Sets the condition for the log message This is used by test frameworks that want to print an assertion message when a test fails.
WithFile(cpp17::string_view file, unsigned int line)
Sets the file name and line number for the log message.
WithMsg(cpp17::string_view msg)
Sets the message for the log message.

Public functions

Build

LogBuffer Build()

Builds the LogBuffer.

LogBufferBuilder

 LogBufferBuilder(
  fuchsia_logging::LogSeverity severity
)

WithCondition

LogBufferBuilder & WithCondition(
  cpp17::string_view condition
)

Sets the condition for the log message This is used by test frameworks that want to print an assertion message when a test fails.

This prepends the string "Check failed: "<

WithFile

LogBufferBuilder & WithFile(
  cpp17::string_view file,
  unsigned int line
)

Sets the file name and line number for the log message.

WithMsg

LogBufferBuilder & WithMsg(
  cpp17::string_view msg
)

Sets the message for the log message.