|
oRTP
0.22.0
|
Logging API. More...
#include <ortp/port.h>Go to the source code of this file.
Defines | |
| #define | ortp_log_level_enabled(level) (ortp_get_log_level_mask() & (level)) |
| #define | ortp_logv(level, fmt, args) |
| #define | CHECK_FORMAT_ARGS(m, n) |
| #define | ortp_debug(...) |
Typedefs | |
| typedef void(* | OrtpLogFunc )(OrtpLogLevel lev, const char *fmt, va_list args) |
Enumerations | |
| enum | OrtpLogLevel { ORTP_DEBUG = 1, ORTP_MESSAGE = 1<<1, ORTP_WARNING = 1<<2, ORTP_ERROR = 1<<3, ORTP_FATAL = 1<<4, ORTP_TRACE = 1<<5, ORTP_LOGLEV_END = 1<<6 } |
Functions | |
| ORTP_PUBLIC void | ortp_set_log_file (FILE *file) |
| ORTP_PUBLIC void | ortp_set_log_handler (OrtpLogFunc func) |
| ORTP_PUBLIC void | ortp_set_log_level_mask (int levelmask) |
| ORTP_PUBLIC int | ortp_get_log_level_mask (void) |
Variables | |
| ORTP_VAR_PUBLIC OrtpLogFunc | ortp_logv_out |
| static void const char * | fmt |
Logging API.
| #define ortp_logv | ( | level, | |
| fmt, | |||
| args | |||
| ) |
{\
if (ortp_logv_out!=NULL && ortp_log_level_enabled(level)) \
ortp_logv_out(level,fmt,args);\
if ((level)==ORTP_FATAL) abort();\
}while(0)
| ORTP_PUBLIC void ortp_set_log_file | ( | FILE * | file | ) |
| file | a FILE pointer where to output the ortp logs. |
| ORTP_PUBLIC void ortp_set_log_handler | ( | OrtpLogFunc | func | ) |
| func,: | your logging function, compatible with the OrtpLogFunc prototype. |
| ORTP_PUBLIC void ortp_set_log_level_mask | ( | int | levelmask | ) |
@ param levelmask a mask of ORTP_DEBUG, ORTP_MESSAGE, ORTP_WARNING, ORTP_ERROR ORTP_FATAL .
1.7.6.1