class Logger

Defined at line 81 of file ../../sdk/lib/driver/logging/cpp/logger.h

Provides a driver's logger.

Public Methods

std::unique_ptr<Logger> Create2 (const Namespace & ns, async_dispatcher_t * dispatcher, std::string_view name, FuchsiaLogSeverity min_severity, std::optional<fidl::ClientEnd<fuchsia_logger::LogSink>> maybe_log_sink)

Defined at line 84 of file ../../sdk/lib/driver/logging/cpp/logger.cc

zx::result<std::unique_ptr<Logger>> Create (const Namespace & ns, async_dispatcher_t * dispatcher, std::string_view name, FuchsiaLogSeverity min_severity, std::optional<fidl::ClientEnd<fuchsia_logger::LogSink>> maybe_log_sink)

Defined at line 112 of file ../../sdk/lib/driver/logging/cpp/logger.cc

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

Begins a structured logging record. You probably don't want to call

this directly.

Defined at line 70 of file ../../sdk/lib/driver/logging/cpp/logger.cc

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

Sends a log record to the backend. You probably don't want to call this directly.

This call also increments dropped_logs_, which is why we don't call FlushRecord

on LogBuffer directly.

Defined at line 55 of file ../../sdk/lib/driver/logging/cpp/logger.cc

void Logger ()

A no-op logger.

Defined at line 124 of file ../../sdk/lib/driver/logging/cpp/logger.h

void Logger (fuchsia_logging::Logger logger)

Defined at line 136 of file ../../sdk/lib/driver/logging/cpp/logger.h

void Logger (std::string_view name, FuchsiaLogSeverity min_severity)

Defined at line 139 of file ../../sdk/lib/driver/logging/cpp/logger.h

template <typename... Args>
void log (SeverityAndSourceLocation sasl, std::format_string<Args...> fmt, Args &&... args)

Defined at line 172 of file ../../sdk/lib/driver/logging/cpp/logger.h

template <typename... Args>
void log (FuchsiaLogSeverity severity, const std::source_location & loc, std::format_string<Args...> fmt, Args &&... args)

Defined at line 178 of file ../../sdk/lib/driver/logging/cpp/logger.h

template <typename... Args>
void log (const char * tag, FuchsiaLogSeverity severity, const char * file, int line, std::format_string<Args...> fmt, Args &&... args)

Defined at line 184 of file ../../sdk/lib/driver/logging/cpp/logger.h

bool IsNoOp ()

Defined at line 208 of file ../../sdk/lib/driver/logging/cpp/logger.h

bool IsNoOp ()

Defined at line 211 of file ../../sdk/lib/driver/logging/cpp/logger.h

Logger * GlobalInstance ()

Defined at line 259 of file ../../sdk/lib/driver/logging/cpp/logger.cc

void SetGlobalInstance (Logger * )

Defined at line 264 of file ../../sdk/lib/driver/logging/cpp/logger.cc

bool HasGlobalInstance ()

Defined at line 266 of file ../../sdk/lib/driver/logging/cpp/logger.cc

void ~Logger ()

Defined at line 268 of file ../../sdk/lib/driver/logging/cpp/logger.cc

uint32_t GetAndResetDropped ()

Retrieves the number of dropped logs and resets it

Defined at line 270 of file ../../sdk/lib/driver/logging/cpp/logger.cc

FuchsiaLogSeverity GetSeverity ()

Defined at line 274 of file ../../sdk/lib/driver/logging/cpp/logger.cc

void SetSeverity (FuchsiaLogSeverity severity)

Defined at line 283 of file ../../sdk/lib/driver/logging/cpp/logger.cc

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

Defined at line 286 of file ../../sdk/lib/driver/logging/cpp/logger.cc

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

Defined at line 315 of file ../../sdk/lib/driver/logging/cpp/logger.cc

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

Defined at line 326 of file ../../sdk/lib/driver/logging/cpp/logger.cc

void vlog (FuchsiaLogSeverity severity, const char * tag, const char * file, int line, std::string_view fmt, std::format_args args)

Defined at line 465 of file ../../sdk/lib/driver/logging/cpp/logger.cc

Records