25#define OXR_WARN_ONCE(log, ...) \
27 static bool _once = false; \
30 oxr_warn(log, __VA_ARGS__); \
42 const char *api_func_name;
52oxr_log_init(
struct oxr_logger *logger,
const char *api_func_name);
56oxr_log(
struct oxr_logger *logger,
const char *fmt, ...) XRT_PRINTF_FORMAT(2, 3);
58oxr_warn(struct
oxr_logger *logger, const
char *fmt, ...) XRT_PRINTF_FORMAT(2, 3);
void(* u_pp_delegate_func_t)(void *ptr, const char *str, size_t length)
Function prototype for receiving pretty printed strings.
Definition: u_pretty_print.h:41
void oxr_warn_slog(struct oxr_logger *log, struct oxr_sink_logger *slog)
Flush sink as a warning message, frees all internal data.
Definition: oxr_logger.c:316
void void XrResult oxr_error(struct oxr_logger *logger, XrResult result, const char *fmt,...) XRT_PRINTF_FORMAT(3
Output an error and return the result code.
void oxr_log_slog(struct oxr_logger *log, struct oxr_sink_logger *slog)
Flush sink as a log message, frees all internal data.
Definition: oxr_logger.c:309
void oxr_slog_cancel(struct oxr_sink_logger *slog)
Cancel logging, frees all internal data.
Definition: oxr_logger.c:303
void void oxr_slog_add_array(struct oxr_sink_logger *slog, const char *str, size_t size)
Add the string to the slog struct.
Definition: oxr_logger.c:288
static u_pp_delegate_t oxr_slog_dg(struct oxr_sink_logger *slog)
Get a pretty print delegate from a oxr_sink_logger.
Definition: oxr_logger.h:110
void oxr_slog(struct oxr_sink_logger *slog, const char *fmt,...) XRT_PRINTF_FORMAT(2
Log string to sink logger.
XrResult oxr_error_slog(struct oxr_logger *log, XrResult res, struct oxr_sink_logger *slog)
Flush sink as a error message, frees all internal data.
Definition: oxr_logger.c:323
Main object that ties everything together.
Definition: oxr_objects.h:1626
Logger struct that lives on the stack, one for each call client call.
Definition: oxr_logger.h:40
Allocate on the stack, make sure to zero initialize.
Definition: oxr_logger.h:88
Helper struct to hold a function pointer and data pointer.
Definition: u_pretty_print.h:49
Pretty printing various Monado things.