Logging API.
More...
#include <ortp/port.h>
Go to the source code of this file.
Macros |
#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
} |
Variables |
ORTP_VAR_PUBLIC OrtpLogFunc | ortp_logv_out |
static void const char * | fmt |
Detailed Description
Macro Definition Documentation
#define ortp_logv |
( |
|
level, |
|
|
|
fmt, |
|
|
|
args |
|
) |
| |
Value:{\
if (ortp_logv_out!=NULL && ortp_log_level_enabled(level)) \
ortp_logv_out(level,fmt,args);\
if ((level)==ORTP_FATAL) abort();\
}while(0)
Function Documentation
ORTP_PUBLIC void ortp_set_log_file |
( |
FILE * |
file | ) |
|
- Parameters:
-
file | a FILE pointer where to output the ortp logs. |
ORTP_PUBLIC void ortp_set_log_handler |
( |
OrtpLogFunc |
func | ) |
|
- Parameters:
-
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 .