class Logger
Defined at line 79 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)
Defined at line 83 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)
Defined at line 102 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 69 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 54 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void Logger ()
A no-op logger.
Defined at line 114 of file ../../sdk/lib/driver/logging/cpp/logger.h
void Logger (fuchsia_logging::Logger logger)
Defined at line 126 of file ../../sdk/lib/driver/logging/cpp/logger.h
void Logger (std::string_view name, FuchsiaLogSeverity min_severity)
Defined at line 129 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 162 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 168 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 174 of file ../../sdk/lib/driver/logging/cpp/logger.h
bool IsNoOp ()
Defined at line 198 of file ../../sdk/lib/driver/logging/cpp/logger.h
bool IsNoOp ()
Defined at line 201 of file ../../sdk/lib/driver/logging/cpp/logger.h
Logger * GlobalInstance ()
Defined at line 229 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void SetGlobalInstance (Logger * )
Defined at line 234 of file ../../sdk/lib/driver/logging/cpp/logger.cc
bool HasGlobalInstance ()
Defined at line 236 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void ~Logger ()
Defined at line 238 of file ../../sdk/lib/driver/logging/cpp/logger.cc
uint32_t GetAndResetDropped ()
Retrieves the number of dropped logs and resets it
Defined at line 240 of file ../../sdk/lib/driver/logging/cpp/logger.cc
FuchsiaLogSeverity GetSeverity ()
Defined at line 244 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void SetSeverity (FuchsiaLogSeverity severity)
Defined at line 253 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 256 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 285 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 296 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 435 of file ../../sdk/lib/driver/logging/cpp/logger.cc