fdf::Logger

Summary

Constructors and Destructors

Logger(std::string_view name, FuchsiaLogSeverity min_severity, zx::socket socket, fidl::WireClient< fuchsia_logger::LogSink > log_sink)
~Logger()

Public static functions

Create(const Namespace & ns, async_dispatcher_t *dispatcher, std::string_view name, FuchsiaLogSeverity min_severity, bool wait_for_initial_interest)
zx::result< std::unique_ptr< Logger > >
GlobalInstance()
Logger *
HasGlobalInstance()
bool
SetGlobalInstance(Logger *)
void

Public functions

BeginRecord(fuchsia_syslog::LogBuffer & buffer, FuchsiaLogSeverity severity, cpp17::optional< cpp17::string_view > file_name, unsigned int line, cpp17::optional< cpp17::string_view > message, uint32_t dropped)
void
FlushRecord(fuchsia_syslog::LogBuffer & buffer, uint32_t dropped)
bool
GetAndResetDropped()
uint32_t
GetSeverity()
FuchsiaLogSeverity
SetSeverity(FuchsiaLogSeverity severity)
void
logf(FuchsiaLogSeverity severity, const char *tag, const char *file, int line, const char *msg, ...) __PRINTFLIKE(6
void
logvf(FuchsiaLogSeverity severity, const char *tag, const char *file, int line, const char *msg, va_list args)
void void
logvf(FuchsiaLogSeverity severity, cpp20::span< std::string > tags, const char *file, int line, const char *msg, va_list args)
void

Public static functions

Create

zx::result< std::unique_ptr< Logger > > Create(
  const Namespace & ns,
  async_dispatcher_t *dispatcher,
  std::string_view name,
  FuchsiaLogSeverity min_severity,
  bool wait_for_initial_interest
)

GlobalInstance

Logger * GlobalInstance()

HasGlobalInstance

bool HasGlobalInstance()

SetGlobalInstance

void SetGlobalInstance(
  Logger *
)

Public functions

BeginRecord

void BeginRecord(
  fuchsia_syslog::LogBuffer & buffer,
  FuchsiaLogSeverity severity,
  cpp17::optional< cpp17::string_view > file_name,
  unsigned int line,
  cpp17::optional< cpp17::string_view > message,
  uint32_t dropped
)

FlushRecord

bool FlushRecord(
  fuchsia_syslog::LogBuffer & buffer,
  uint32_t dropped
)

GetAndResetDropped

uint32_t GetAndResetDropped()

GetSeverity

FuchsiaLogSeverity GetSeverity()

Logger

 Logger(
  std::string_view name,
  FuchsiaLogSeverity min_severity,
  zx::socket socket,
  fidl::WireClient< fuchsia_logger::LogSink > log_sink
)

SetSeverity

void SetSeverity(
  FuchsiaLogSeverity severity
)

logf

void logf(
  FuchsiaLogSeverity severity,
  const char *tag,
  const char *file,
  int line,
  const char *msg,
  ...
) __PRINTFLIKE(6

logvf

void void logvf(
  FuchsiaLogSeverity severity,
  const char *tag,
  const char *file,
  int line,
  const char *msg,
  va_list args
)

logvf

void logvf(
  FuchsiaLogSeverity severity,
  cpp20::span< std::string > tags,
  const char *file,
  int line,
  const char *msg,
  va_list args
)

~Logger

 ~Logger()