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_viewname,FuchsiaLogSeveritymin_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_viewname,FuchsiaLogSeveritymin_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 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
template <typename... Args>
void log (SeverityAndSourceLocationsasl,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 (FuchsiaLogSeverityseverity,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,FuchsiaLogSeverityseverity,const char *file,intline,std::format_string<Args...>fmt,Args &&...args)
Defined at line 184 of file ../../sdk/lib/driver/logging/cpp/logger.h
Logger * GlobalInstance ()
Defined at line 260 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void SetGlobalInstance (Logger * )
Defined at line 265 of file ../../sdk/lib/driver/logging/cpp/logger.cc
bool HasGlobalInstance ()
Defined at line 267 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void ~Logger ()
Defined at line 269 of file ../../sdk/lib/driver/logging/cpp/logger.cc
uint32_t GetAndResetDropped ()
Retrieves the number of dropped logs and resets it
Defined at line 271 of file ../../sdk/lib/driver/logging/cpp/logger.cc
FuchsiaLogSeverity GetSeverity ()
Defined at line 275 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void logf (FuchsiaLogSeverityseverity,const char *tag,const char *file,intline,const char *msg)
Defined at line 287 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void logvf (FuchsiaLogSeverityseverity,const char *tag,const char *file,intline,const char *msg,va_listargs)
Defined at line 316 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void logvf (FuchsiaLogSeverityseverity,cpp20::span<std::string>tags,const char *file,intline,const char *msg,va_listargs)
Defined at line 327 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void vlog (FuchsiaLogSeverityseverity,const char *tag,const char *file,intline,std::string_viewfmt,std::format_argsargs)
Defined at line 466 of file ../../sdk/lib/driver/logging/cpp/logger.cc
void BeginRecord (fuchsia_logging::LogBuffer &buffer,FuchsiaLogSeverityseverity,std::optional<std::string_view>file_name,unsigned intline,std::optional<std::string_view>message,uint32_tdropped)
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 (std::string_view name, FuchsiaLogSeverity min_severity)
Defined at line 139 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
void SetSeverity (FuchsiaLogSeverity severity)
Defined at line 284 of file ../../sdk/lib/driver/logging/cpp/logger.cc