|
Helper Reference Manual
1.7.1
|
Debug logging.
Macros | |
| #define | ODPH_LOG(level, fmt, ...) |
| Output a log with file, line and function information. More... | |
| #define | ODPH_ASSERT(cond) |
| Runtime assertion macro. More... | |
| #define | ODPH_DBG(...) |
| Debug log macro. More... | |
| #define | ODPH_ERR(...) |
| Error log macro. More... | |
| #define | ODPH_ABORT(...) |
| Abort macro. More... | |
Typedefs | |
| typedef enum odph_log_level | odph_log_level_e |
| Log level. | |
Enumerations | |
| enum | odph_log_level { ODPH_LOG_DBG , ODPH_LOG_ERR , ODPH_LOG_ABORT } |
| Log level. | |
| #define ODPH_LOG | ( | level, | |
| fmt, | |||
| ... | |||
| ) |
Output a log with file, line and function information.
Outputs a log if level is not ODPH_LOG_DBG, or if ODPH_DEBUG_PRINT is enabled (–enable-helper-debug-print configure option). Calls odp_log_fn_get() to get the current log function. If no log function is set, prints to stderr.
Additionally, if level is ODPH_LOG_ABORT, calls odp_abort_fn_get() to get the current abort function and calls it to abort the application. If no abort function is set, calls abort().
| #define ODPH_ASSERT | ( | cond | ) |
Runtime assertion macro.
No code is generated when ODPH_DEBUG=0. Prints error message and aborts when ODPH_DEBUG=1 (–enable-helper-debug configure option) and 'cond' is false.
| #define ODPH_DBG | ( | ... | ) |
Debug log macro.
Outputs a log with level ODPH_LOG_DBG. See ODPH_LOG() for more information.
| #define ODPH_ERR | ( | ... | ) |
Error log macro.
Outputs a log with level ODPH_LOG_ERR. See ODPH_LOG() for more information.
| #define ODPH_ABORT | ( | ... | ) |
Abort macro.
Outputs a log with level ODPH_LOG_ABORT and aborts the application. See ODPH_LOG() for more information.