Monado OpenXR Runtime
Logging functions
Collaboration diagram for Logging functions:

Files

file  u_logging.h
 Basic logging functionality.
 

Macros

#define U_LOG_RAW(...)
 For places where you really want printf, prints a new-line. More...
 

Typedefs

typedef void(* u_log_sink_func_t) (const char *file, int line, const char *func, enum u_logging_level level, const char *format, va_list args, void *data)
 Function typedef for setting the logging sink. More...
 

Enumerations

enum  u_logging_level {
  U_LOGGING_TRACE , U_LOGGING_DEBUG , U_LOGGING_INFO , U_LOGGING_WARN ,
  U_LOGGING_ERROR , U_LOGGING_RAW
}
 Logging level enum. More...
 

Base Logging Utilities

In most cases, you will want to use another macro from this file, or a module/driver-local macro, to do your logging.

enum u_logging_level u_log_get_global_level (void)
 Returns the global logging level, subsystems own logging level take precedence. More...
 
void u_log (const char *file, int line, const char *func, enum u_logging_level level, const char *format,...) XRT_PRINTF_FORMAT(5
 Main non-device-related log implementation function: do not call directly, use a macro that wraps it. More...
 
void void u_log_xdev (const char *file, int line, const char *func, enum u_logging_level level, struct xrt_device *xdev, const char *format,...) XRT_PRINTF_FORMAT(6
 Main device-related log implementation function: do not call directly, use a macro that wraps it. More...
 
void void void u_log_hex (const char *file, int line, const char *func, enum u_logging_level level, const uint8_t *data, const size_t data_size)
 Log implementation for dumping memory buffers as hex: do not call directly, use a macro that wraps it. More...
 
void u_log_xdev_hex (const char *file, int line, const char *func, enum u_logging_level level, struct xrt_device *xdev, const uint8_t *data, const size_t data_size)
 Device-related log implementation for dumping memory buffers as hex: do not call directly, use a macro that wraps it. More...
 
void u_log_set_sink (u_log_sink_func_t func, void *data)
 Sets the logging sink, log is still passed on to the platform defined output as well as the sink. More...
 
#define U_LOG(level, ...)
 Log a message at level , with file, line, and function context (always logs) - typically wrapped in a helper macro. More...
 
#define U_LOG_IFL(level, cond_level, ...)
 Log at level only if the level is at least cond_level - typically wrapped in a helper macro. More...
 
#define U_LOG_XDEV(level, xdev, ...)
 Log at level for a given xrt_device - typically wrapped in a helper macro. More...
 
#define U_LOG_XDEV_IFL(level, cond_level, xdev, ...)
 Log at level for a given xrt_device, only if the level is at least cond_level - typically wrapped in a helper macro. More...
 
#define U_LOG_IFL_HEX(level, cond_level, data, data_size)
 Log a memory hexdump at level only if the level is at least cond_level - typically wrapped in a helper macro. More...
 
#define U_LOG_XDEV_IFL_HEX(level, cond_level, xdev, data, data_size)
 Log a memory hexdump at level for a given xrt_device, only if the level is at least cond_level - typically wrapped in a helper macro. More...
 

Logging macros conditional on global log level

These each imply a log level, and will only log if the global log level is equal or lower.

They are often used for one-off logging in a module with few other logging needs, where having a module-specific log level would be unnecessary.

See also
U_LOG_IFL, u_log_get_global_level()
Parameters
...Format string and optional format arguments.
#define U_LOG_T(...)   U_LOG_IFL_T(u_log_get_global_level(), __VA_ARGS__)
 Log a message at U_LOGGING_TRACE level, conditional on the global log level. More...
 
#define U_LOG_D(...)   U_LOG_IFL_D(u_log_get_global_level(), __VA_ARGS__)
 Log a message at U_LOGGING_DEBUG level, conditional on the global log level. More...
 
#define U_LOG_I(...)   U_LOG_IFL_I(u_log_get_global_level(), __VA_ARGS__)
 Log a message at U_LOGGING_INFO level, conditional on the global log level. More...
 
#define U_LOG_W(...)   U_LOG_IFL_W(u_log_get_global_level(), __VA_ARGS__)
 Log a message at U_LOGGING_WARN level, conditional on the global log level. More...
 
#define U_LOG_E(...)   U_LOG_IFL_E(u_log_get_global_level(), __VA_ARGS__)
 Log a message at U_LOGGING_ERROR level, conditional on the global log level. More...
 

Logging macros conditional on provided log level

These are often wrapped within a module, to automatically supply cond_level as appropriate for that module.

See also
U_LOG_IFL
Parameters
cond_levelThe minimum u_logging_level that will be actually output.
...Format string and optional format arguments.
#define U_LOG_IFL_T(cond_level, ...)   U_LOG_IFL(U_LOGGING_TRACE, cond_level, __VA_ARGS__)
 Conditionally log a message at U_LOGGING_TRACE level. More...
 
#define U_LOG_IFL_D(cond_level, ...)   U_LOG_IFL(U_LOGGING_DEBUG, cond_level, __VA_ARGS__)
 Conditionally log a message at U_LOGGING_DEBUG level. More...
 
#define U_LOG_IFL_I(cond_level, ...)   U_LOG_IFL(U_LOGGING_INFO, cond_level, __VA_ARGS__)
 Conditionally log a message at U_LOGGING_INFO level. More...
 
#define U_LOG_IFL_W(cond_level, ...)   U_LOG_IFL(U_LOGGING_WARN, cond_level, __VA_ARGS__)
 Conditionally log a message at U_LOGGING_WARN level. More...
 
#define U_LOG_IFL_E(cond_level, ...)   U_LOG_IFL(U_LOGGING_ERROR, cond_level, __VA_ARGS__)
 Conditionally log a message at U_LOGGING_ERROR level. More...
 
#define U_LOG_IFL_T_HEX(cond_level, data, data_size)   U_LOG_IFL_HEX(U_LOGGING_TRACE, cond_level, data, data_size)
 Conditionally log a memory hexdump at U_LOGGING_TRACE level. More...
 
#define U_LOG_IFL_D_HEX(cond_level, data, data_size)   U_LOG_IFL_HEX(U_LOGGING_DEBUG, cond_level, data, data_size)
 Conditionally log a memory hexdump at U_LOGGING_DEBUG level. More...
 

Device-related logging macros conditional on provided log level

These are often wrapped within a driver, to automatically supply xdev and cond_level from their conventional names and log level member variable.

Parameters
levelA u_logging_level value for this message.
cond_levelThe minimum u_logging_level that will be actually output.
xdevThe xrt_device pointer associated with this message.
...Format string and optional format arguments.
#define U_LOG_XDEV_IFL_T(xdev, cond_level, ...)   U_LOG_XDEV_IFL(U_LOGGING_TRACE, cond_level, xdev, __VA_ARGS__)
 Conditionally log a device-related message at U_LOGGING_TRACE level. More...
 
#define U_LOG_XDEV_IFL_D(xdev, cond_level, ...)   U_LOG_XDEV_IFL(U_LOGGING_DEBUG, cond_level, xdev, __VA_ARGS__)
 Conditionally log a device-related message at U_LOGGING_DEBUG level. More...
 
#define U_LOG_XDEV_IFL_I(xdev, cond_level, ...)   U_LOG_XDEV_IFL(U_LOGGING_INFO, cond_level, xdev, __VA_ARGS__)
 Conditionally log a device-related message at U_LOGGING_INFO level. More...
 
#define U_LOG_XDEV_IFL_W(xdev, cond_level, ...)   U_LOG_XDEV_IFL(U_LOGGING_WARN, cond_level, xdev, __VA_ARGS__)
 Conditionally log a device-related message at U_LOGGING_WARN level. More...
 
#define U_LOG_XDEV_IFL_E(xdev, cond_level, ...)   U_LOG_XDEV_IFL(U_LOGGING_ERROR, cond_level, xdev, __VA_ARGS__)
 Conditionally log a device-related message at U_LOGGING_ERROR level. More...
 
#define U_LOG_XDEV_IFL_T_HEX(xdev, cond_level, data, data_size)    U_LOG_XDEV_IFL_HEX(U_LOGGING_TRACE, cond_level, xdev, data, data_size)
 Conditionally log a device-related memory hexdump at U_LOGGING_TRACE level. More...
 
#define U_LOG_XDEV_IFL_D_HEX(xdev, cond_level, data, data_size)    U_LOG_XDEV_IFL_HEX(U_LOGGING_DEBUG, cond_level, xdev, data, data_size)
 Conditionally log a device-related memory hexdump message at U_LOGGING_DEBUG level. More...
 

Device-related logging macros that always log.

These wrap U_LOG_XDEV() to supply the level - which is only used for formatting the output, these macros always log regardless of level.

Parameters
xdevThe xrt_device pointer associated with this message.
...Format string and optional format arguments.
#define U_LOG_XDEV_T(xdev, ...)   U_LOG_XDEV(U_LOGGING_TRACE, xdev, __VA_ARGS__)
 Log a device-related message at U_LOGGING_TRACE level (always logs). More...
 
#define U_LOG_XDEV_D(xdev, ...)   U_LOG_XDEV(U_LOGGING_DEBUG, xdev, __VA_ARGS__)
 Log a device-related message at U_LOGGING_DEBUG level (always logs). More...
 
#define U_LOG_XDEV_I(xdev, ...)   U_LOG_XDEV(U_LOGGING_INFO, xdev, __VA_ARGS__)
 Log a device-related message at U_LOGGING_INFO level (always logs). More...
 
#define U_LOG_XDEV_W(xdev, ...)   U_LOG_XDEV(U_LOGGING_WARN, xdev, __VA_ARGS__)
 Log a device-related message at U_LOGGING_WARN level (always logs). More...
 
#define U_LOG_XDEV_E(xdev, ...)   U_LOG_XDEV(U_LOGGING_ERROR, xdev, __VA_ARGS__)
 Log a device-related message at U_LOGGING_ERROR level (always logs). More...
 

Detailed Description

Macro Definition Documentation

◆ U_LOG

#define U_LOG (   level,
  ... 
)

#include <auxiliary/util/u_logging.h>

Value:
do { \
u_log(__FILE__, __LINE__, __func__, level, __VA_ARGS__); \
} while (false)

Log a message at level , with file, line, and function context (always logs) - typically wrapped in a helper macro.

Parameters
levelA u_logging_level value for this message.
...Format string and optional format arguments.

◆ U_LOG_D

#define U_LOG_D (   ...)    U_LOG_IFL_D(u_log_get_global_level(), __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a message at U_LOGGING_DEBUG level, conditional on the global log level.

◆ U_LOG_E

#define U_LOG_E (   ...)    U_LOG_IFL_E(u_log_get_global_level(), __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a message at U_LOGGING_ERROR level, conditional on the global log level.

◆ U_LOG_I

#define U_LOG_I (   ...)    U_LOG_IFL_I(u_log_get_global_level(), __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a message at U_LOGGING_INFO level, conditional on the global log level.

◆ U_LOG_IFL

#define U_LOG_IFL (   level,
  cond_level,
  ... 
)

#include <auxiliary/util/u_logging.h>

Value:
do { \
if (cond_level <= level) { \
u_log(__FILE__, __LINE__, __func__, level, __VA_ARGS__); \
} \
} while (false)

Log at level only if the level is at least cond_level - typically wrapped in a helper macro.

Adds file, line, and function context. Like U_LOG() but conditional.

Parameters
levelA u_logging_level value for this message.
cond_levelThe minimum u_logging_level that will be actually output.
...Format string and optional format arguments.

◆ U_LOG_IFL_D

#define U_LOG_IFL_D (   cond_level,
  ... 
)    U_LOG_IFL(U_LOGGING_DEBUG, cond_level, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a message at U_LOGGING_DEBUG level.

◆ U_LOG_IFL_D_HEX

#define U_LOG_IFL_D_HEX (   cond_level,
  data,
  data_size 
)    U_LOG_IFL_HEX(U_LOGGING_DEBUG, cond_level, data, data_size)

#include <auxiliary/util/u_logging.h>

Conditionally log a memory hexdump at U_LOGGING_DEBUG level.

◆ U_LOG_IFL_E

#define U_LOG_IFL_E (   cond_level,
  ... 
)    U_LOG_IFL(U_LOGGING_ERROR, cond_level, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a message at U_LOGGING_ERROR level.

◆ U_LOG_IFL_HEX

#define U_LOG_IFL_HEX (   level,
  cond_level,
  data,
  data_size 
)

#include <auxiliary/util/u_logging.h>

Value:
do { \
if (cond_level <= level) { \
u_log_hex(__FILE__, __LINE__, __func__, level, data, data_size); \
} \
} while (false)

Log a memory hexdump at level only if the level is at least cond_level - typically wrapped in a helper macro.

Adds file, line, and function context. Like U_LOG_IFL()

Parameters
levelA u_logging_level value for this message.
cond_levelThe minimum u_logging_level that will be actually output.
dataThe data to print in hexdump format
data_sizeThe size (in bytes) of the data block

◆ U_LOG_IFL_I

#define U_LOG_IFL_I (   cond_level,
  ... 
)    U_LOG_IFL(U_LOGGING_INFO, cond_level, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a message at U_LOGGING_INFO level.

◆ U_LOG_IFL_T

#define U_LOG_IFL_T (   cond_level,
  ... 
)    U_LOG_IFL(U_LOGGING_TRACE, cond_level, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a message at U_LOGGING_TRACE level.

◆ U_LOG_IFL_T_HEX

#define U_LOG_IFL_T_HEX (   cond_level,
  data,
  data_size 
)    U_LOG_IFL_HEX(U_LOGGING_TRACE, cond_level, data, data_size)

#include <auxiliary/util/u_logging.h>

Conditionally log a memory hexdump at U_LOGGING_TRACE level.

◆ U_LOG_IFL_W

#define U_LOG_IFL_W (   cond_level,
  ... 
)    U_LOG_IFL(U_LOGGING_WARN, cond_level, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a message at U_LOGGING_WARN level.

◆ U_LOG_RAW

#define U_LOG_RAW (   ...)

#include <auxiliary/util/u_logging.h>

Value:
do { \
u_log(__FILE__, __LINE__, __func__, U_LOGGING_RAW, __VA_ARGS__); \
} while (false)
@ U_LOGGING_RAW
Special level for raw printing, prints a new-line.
Definition: u_logging.h:46

For places where you really want printf, prints a new-line.

◆ U_LOG_T

#define U_LOG_T (   ...)    U_LOG_IFL_T(u_log_get_global_level(), __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a message at U_LOGGING_TRACE level, conditional on the global log level.

◆ U_LOG_W

#define U_LOG_W (   ...)    U_LOG_IFL_W(u_log_get_global_level(), __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a message at U_LOGGING_WARN level, conditional on the global log level.

◆ U_LOG_XDEV

#define U_LOG_XDEV (   level,
  xdev,
  ... 
)

#include <auxiliary/util/u_logging.h>

Value:
do { \
u_log_xdev(__FILE__, __LINE__, __func__, level, xdev, __VA_ARGS__); \
} while (false)

Log at level for a given xrt_device - typically wrapped in a helper macro.

Adds file, line, and function context, and forwards device context from provided xdev .

Like U_LOG() but calling u_log_xdev() (which takes a device) instead.

Parameters
levelA u_logging_level value for this message.
xdevThe xrt_device pointer associated with this message.
...Format string and optional format arguments.

◆ U_LOG_XDEV_D

#define U_LOG_XDEV_D (   xdev,
  ... 
)    U_LOG_XDEV(U_LOGGING_DEBUG, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a device-related message at U_LOGGING_DEBUG level (always logs).

◆ U_LOG_XDEV_E

#define U_LOG_XDEV_E (   xdev,
  ... 
)    U_LOG_XDEV(U_LOGGING_ERROR, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a device-related message at U_LOGGING_ERROR level (always logs).

◆ U_LOG_XDEV_I

#define U_LOG_XDEV_I (   xdev,
  ... 
)    U_LOG_XDEV(U_LOGGING_INFO, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a device-related message at U_LOGGING_INFO level (always logs).

◆ U_LOG_XDEV_IFL

#define U_LOG_XDEV_IFL (   level,
  cond_level,
  xdev,
  ... 
)

#include <auxiliary/util/u_logging.h>

Value:
do { \
if (cond_level <= level) { \
u_log_xdev(__FILE__, __LINE__, __func__, level, xdev, __VA_ARGS__); \
} \
} while (false)

Log at level for a given xrt_device, only if the level is at least cond_level - typically wrapped in a helper macro.

Adds file, line, and function context, and forwards device context from provided xdev .

Parameters
levelA u_logging_level value for this message.
cond_levelThe minimum u_logging_level that will be actually output.
xdevThe xrt_device pointer associated with this message.
...Format string and optional format arguments.

◆ U_LOG_XDEV_IFL_D

#define U_LOG_XDEV_IFL_D (   xdev,
  cond_level,
  ... 
)    U_LOG_XDEV_IFL(U_LOGGING_DEBUG, cond_level, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a device-related message at U_LOGGING_DEBUG level.

◆ U_LOG_XDEV_IFL_D_HEX

#define U_LOG_XDEV_IFL_D_HEX (   xdev,
  cond_level,
  data,
  data_size 
)     U_LOG_XDEV_IFL_HEX(U_LOGGING_DEBUG, cond_level, xdev, data, data_size)

#include <auxiliary/util/u_logging.h>

Conditionally log a device-related memory hexdump message at U_LOGGING_DEBUG level.

◆ U_LOG_XDEV_IFL_E

#define U_LOG_XDEV_IFL_E (   xdev,
  cond_level,
  ... 
)    U_LOG_XDEV_IFL(U_LOGGING_ERROR, cond_level, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a device-related message at U_LOGGING_ERROR level.

◆ U_LOG_XDEV_IFL_HEX

#define U_LOG_XDEV_IFL_HEX (   level,
  cond_level,
  xdev,
  data,
  data_size 
)

#include <auxiliary/util/u_logging.h>

Value:
do { \
if (cond_level <= level) { \
u_log_xdev_hex(__FILE__, __LINE__, __func__, level, xdev, data, data_size); \
} \
} while (false)

Log a memory hexdump at level for a given xrt_device, only if the level is at least cond_level - typically wrapped in a helper macro.

Adds file, line, and function context, and forwards device context from provided xdev .

Parameters
levelA u_logging_level value for this message.
cond_levelThe minimum u_logging_level that will be actually output.
xdevThe xrt_device pointer associated with this message.
dataThe data to print in hexdump format
data_sizeThe size (in bytes) of the data block

◆ U_LOG_XDEV_IFL_I

#define U_LOG_XDEV_IFL_I (   xdev,
  cond_level,
  ... 
)    U_LOG_XDEV_IFL(U_LOGGING_INFO, cond_level, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a device-related message at U_LOGGING_INFO level.

◆ U_LOG_XDEV_IFL_T

#define U_LOG_XDEV_IFL_T (   xdev,
  cond_level,
  ... 
)    U_LOG_XDEV_IFL(U_LOGGING_TRACE, cond_level, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a device-related message at U_LOGGING_TRACE level.

◆ U_LOG_XDEV_IFL_T_HEX

#define U_LOG_XDEV_IFL_T_HEX (   xdev,
  cond_level,
  data,
  data_size 
)     U_LOG_XDEV_IFL_HEX(U_LOGGING_TRACE, cond_level, xdev, data, data_size)

#include <auxiliary/util/u_logging.h>

Conditionally log a device-related memory hexdump at U_LOGGING_TRACE level.

◆ U_LOG_XDEV_IFL_W

#define U_LOG_XDEV_IFL_W (   xdev,
  cond_level,
  ... 
)    U_LOG_XDEV_IFL(U_LOGGING_WARN, cond_level, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Conditionally log a device-related message at U_LOGGING_WARN level.

◆ U_LOG_XDEV_T

#define U_LOG_XDEV_T (   xdev,
  ... 
)    U_LOG_XDEV(U_LOGGING_TRACE, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a device-related message at U_LOGGING_TRACE level (always logs).

◆ U_LOG_XDEV_W

#define U_LOG_XDEV_W (   xdev,
  ... 
)    U_LOG_XDEV(U_LOGGING_WARN, xdev, __VA_ARGS__)

#include <auxiliary/util/u_logging.h>

Log a device-related message at U_LOGGING_WARN level (always logs).

Typedef Documentation

◆ u_log_sink_func_t

typedef void(* u_log_sink_func_t) (const char *file, int line, const char *func, enum u_logging_level level, const char *format, va_list args, void *data)

#include <auxiliary/util/u_logging.h>

Function typedef for setting the logging sink.

Parameters
fileSource file name associated with a message.
lineSource file line associated with a message.
funcFunction name associated with a message.
levelMessage level: used for formatting or forwarding to native log functions.
formatFormat string.
argsFormat parameters.
dataUser data.

Enumeration Type Documentation

◆ u_logging_level

#include <auxiliary/util/u_logging.h>

Logging level enum.

Enumerator
U_LOGGING_TRACE 

Trace messages, highly verbose.

U_LOGGING_DEBUG 

Debug messages, verbose.

U_LOGGING_INFO 

Info messages: not very verbose, not indicating a problem.

U_LOGGING_WARN 

Warning messages: indicating a potential problem.

U_LOGGING_ERROR 

Error messages: indicating a problem.

U_LOGGING_RAW 

Special level for raw printing, prints a new-line.

Function Documentation

◆ u_log()

void u_log ( const char *  file,
int  line,
const char *  func,
enum u_logging_level  level,
const char *  format,
  ... 
)

#include <auxiliary/util/u_logging.h>

Main non-device-related log implementation function: do not call directly, use a macro that wraps it.

This function always logs: level is used for printing or passed to native logging functions.

Parameters
fileSource file name associated with a message
lineSource file line associated with a message
funcFunction name associated with a message
levelMessage level: used for formatting or forwarding to native log functions
formatFormat string
...Format parameters

◆ u_log_get_global_level()

enum u_logging_level u_log_get_global_level ( void  )

#include <auxiliary/util/u_logging.h>

Returns the global logging level, subsystems own logging level take precedence.

◆ u_log_hex()

void void void u_log_hex ( const char *  file,
int  line,
const char *  func,
enum u_logging_level  level,
const uint8_t *  data,
const size_t  data_size 
)

#include <auxiliary/util/u_logging.h>

Log implementation for dumping memory buffers as hex: do not call directly, use a macro that wraps it.

This function always logs: level is used for printing or passed to native logging functions.

Parameters
fileSource file name associated with a message
lineSource file line associated with a message
funcFunction name associated with a message
levelMessage level: used for formatting or forwarding to native log functions
dataData buffer to dump
data_sizeSize of the data buffer in bytes

◆ u_log_set_sink()

void u_log_set_sink ( u_log_sink_func_t  func,
void *  data 
)

#include <auxiliary/util/u_logging.h>

Sets the logging sink, log is still passed on to the platform defined output as well as the sink.

Parameters
funcLogging function for the calls to be sent to.
dataUser data to be passed into func.

◆ u_log_xdev()

void void u_log_xdev ( const char *  file,
int  line,
const char *  func,
enum u_logging_level  level,
struct xrt_device xdev,
const char *  format,
  ... 
)

#include <auxiliary/util/u_logging.h>

Main device-related log implementation function: do not call directly, use a macro that wraps it.

This function always logs: level is used for printing or passed to native logging functions.

Parameters
fileSource file name associated with a message
lineSource file line associated with a message
funcFunction name associated with a message
levelMessage level: used for formatting or forwarding to native log functions
xdevThe associated xrt_device
formatFormat string
...Format parameters

◆ u_log_xdev_hex()

void u_log_xdev_hex ( const char *  file,
int  line,
const char *  func,
enum u_logging_level  level,
struct xrt_device xdev,
const uint8_t *  data,
const size_t  data_size 
)

#include <auxiliary/util/u_logging.h>

Device-related log implementation for dumping memory buffers as hex: do not call directly, use a macro that wraps it.

This function always logs: level is used for printing or passed to native logging functions.

Parameters
fileSource file name associated with a message
lineSource file line associated with a message
funcFunction name associated with a message
levelMessage level: used for formatting or forwarding to native log functions
xdevThe associated xrt_device
dataData buffer to dump
data_sizeSize of the data buffer in bytes