Data Accelerator Offload
Loading...
Searching...
No Matches
Macros
dao_log.h File Reference
#include <errno.h>
#include <rte_log.h>
#include <rte_lcore.h>

Go to the source code of this file.

Macros

#define dao_err(...)   dao_log(ERR, __VA_ARGS__)
 
#define dao_warn(...)   dao_log(WARNING, __VA_ARGS__)
 
#define dao_info(...)   dao_log(INFO, __VA_ARGS__)
 
#define dao_dbg(...)
 
#define dao_print(...)
 
#define DAO_ERR_GOTO(err, label, fmt, ...)
 

Detailed Description

DAO Log

DAO logger APIs contains wrappers over DPDK based rte logger. It has API for different log levels.

Definition in file dao_log.h.

Macro Definition Documentation

◆ dao_err

#define dao_err (   ...)    dao_log(ERR, __VA_ARGS__)

Log generic error with function name and line number prefix.

Definition at line 34 of file dao_log.h.

◆ dao_warn

#define dao_warn (   ...)    dao_log(WARNING, __VA_ARGS__)

Log generic warning with function name and line number prefix.

Definition at line 40 of file dao_log.h.

◆ dao_info

#define dao_info (   ...)    dao_log(INFO, __VA_ARGS__)

Log generic info without function name and line number.

Definition at line 46 of file dao_log.h.

◆ dao_dbg

#define dao_dbg (   ...)
Value:
rte_log(RTE_LOG_DEBUG, rte_dao_logtype, \
RTE_FMT("[lcore %2ld] DAO_DBG: %s():%d " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
rte_lcore_id() == LCORE_ID_ANY ? -1 : (int64_t)rte_lcore_id(), __func__, \
__LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))

Log generic debug message with function name and line number prefix.

Definition at line 52 of file dao_log.h.

◆ dao_print

#define dao_print (   ...)
Value:
rte_log(RTE_LOG_INFO, rte_dao_logtype, \
RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", RTE_FMT_TAIL(__VA_ARGS__, )))

Log generic print without function name and line number.

Definition at line 62 of file dao_log.h.

◆ DAO_ERR_GOTO

#define DAO_ERR_GOTO (   err,
  label,
  fmt,
  ... 
)
Value:
do { \
dao_err(fmt, ##__VA_ARGS__); \
errno = err; \
goto label; \
} while (0)

Jump to label with errno set.

Definition at line 72 of file dao_log.h.