Go to the source code of this file.
|
| int | Logger_Dpdk_Init (FILE *output) |
| void | Logger_Spdk (int level, const char *restrict file, const int line, const char *restrict func, const char *restrict format, va_list args) |
| void | Logger_HexDump (const uint8_t *b, size_t count) |
| | Print buffer in hexadecimal to stderr.
|
| DebugString * | DebugString_Get (size_t capacity) |
| | Obtain a buffer for populating a debug string.
|
◆ DebugString_Append
| #define DebugString_Append |
( |
| fn, |
|
|
| ... ) |
Value: do { \
myDebugString->pos += fn(RTE_PTR_ADD(myDebugString->buffer, myDebugString->pos), \
myDebugString->cap - myDebugString->pos, __VA_ARGS__); \
} while (false)
Append to the local debug string variable.
- Parameters
-
◆ DebugString_Return
| #define DebugString_Return |
( |
| ) |
|
Value: do { \
NDNDPDK_ASSERT(myDebugString->pos < myDebugString->cap); \
return myDebugString->buffer; \
} while (false)
Return the buffer in local debug string variable after bounds checking.
◆ DebugString_Use
| #define DebugString_Use |
( |
| capacity | ) |
|
Value:
DebugString * DebugString_Get(size_t capacity)
Obtain a buffer for populating a debug string.
Definition logger.c:68
Declare a debug string variable within a function.
◆ N_LOG
| #define N_LOG |
( |
| lvl, |
|
|
| fmt, |
|
|
| ... ) |
Value:RTE_LOG_DP(lvl, NDN, fmt "\n", ##__VA_ARGS__)
◆ N_LOG_ENABLED
| #define N_LOG_ENABLED |
( |
| lvl | ) |
|
Value: (
RTE_LOG_DP_LEVEL >= RTE_LOG_##lvl && rte_log_get_level(RTE_LOGTYPE_NDN) >= (int)RTE_LOG_##lvl)
#define RTE_LOG_DP_LEVEL
Definition logger.h:12
Determine if a log level is enabled.
- Parameters
-
| lvl | one of DEBUG, INFO, NOTICE, WARNING, ERR. |
◆ N_LOG_ERROR
◆ N_LOG_ERROR_BLANK
◆ N_LOG_ERROR_ERRNO
◆ N_LOG_ERROR_STR
◆ N_LOG_INIT
| #define N_LOG_INIT |
( |
| module | ) |
|
Value: static int RTE_LOGTYPE_NDN = -1; \
RTE_INIT(Logger_Init_##module) { \
RTE_LOGTYPE_NDN = rte_log_register_type_and_pick_level("NDN." #module, RTE_LOG_INFO); \
} \
struct AllowTrailingSemicolon_
◆ N_LOGD
Value:
#define N_LOG(lvl, fmt,...)
Definition logger.h:22
◆ N_LOGE
◆ N_LOGI
Value:N_LOG(NOTICE, __VA_ARGS__)
◆ N_LOGV
Value:N_LOG(DEBUG, __VA_ARGS__)
◆ N_LOGW
Value:N_LOG(WARNING, __VA_ARGS__)
◆ RTE_LOG_DP_LEVEL
| #define RTE_LOG_DP_LEVEL RTE_LOG_DEBUG |
◆ DebugString
| typedef struct DebugString DebugString |
◆ DebugString_Get()
Obtain a buffer for populating a debug string.
- Parameters
-
| capacity | buffer capacity; panics on oversized request. |
- Returns
- pointer to a per-lcore static buffer that will be overwritten on subsequent calls
◆ Logger_Dpdk_Init()
| int Logger_Dpdk_Init |
( |
FILE * | output | ) |
|
◆ Logger_HexDump()
| void Logger_HexDump |
( |
const uint8_t * | b, |
|
|
size_t | count ) |
Print buffer in hexadecimal to stderr.
This is only used during debugging, and should not appear in committed code.
◆ Logger_Spdk()
| void Logger_Spdk |
( |
int | level, |
|
|
const char *restrict | file, |
|
|
const int | line, |
|
|
const char *restrict | func, |
|
|
const char *restrict | format, |
|
|
va_list | args ) |