oRTP
0.27.0
|
Logging API. More...
#include <ortp/port.h>
Macros | |
#define | ORTP_LOG_DOMAIN NULL |
#define | ortp_log_level_enabled(domain, level) (ortp_get_log_level_mask(domain) & (level)) |
#define | CHECK_FORMAT_ARGS(m, n) |
#define | ortp_debug(...) |
Typedefs | |
typedef void(* | OrtpLogFunc )(const char *domain, OrtpLogLevel lev, const char *fmt, va_list args) |
Enumerations | |
enum | OrtpLogLevel { ORTP_DEBUG =1, ORTP_TRACE =1<<1, ORTP_MESSAGE =1<<2, ORTP_WARNING =1<<3, ORTP_ERROR =1<<4, ORTP_FATAL =1<<5, ORTP_LOGLEV_END =1<<6 } |
Functions | |
void | ortp_set_log_file (FILE *file) |
void | ortp_set_log_handler (OrtpLogFunc func) |
OrtpLogFunc | ortp_get_log_handler (void) |
void | ortp_logv_out (const char *domain, OrtpLogLevel level, const char *fmt, va_list args) |
void | ortp_logv (const char *domain, OrtpLogLevel level, const char *fmt, va_list args) |
void | ortp_logv_flush (void) |
void | ortp_set_log_level (const char *domain, OrtpLogLevel level) |
void | ortp_set_log_level_mask (const char *domain, int levelmask) |
unsigned int | ortp_get_log_level_mask (const char *domain) |
void | ortp_set_log_thread_id (unsigned long thread_id) |
Logging API.
void ortp_logv_flush | ( | void | ) |
Flushes the log output queue. WARNING: Must be called from the thread that has been defined with ortp_set_log_thread_id().
void ortp_set_log_file | ( | FILE * | file | ) |
file | a FILE pointer where to output the ortp logs. |
void ortp_set_log_handler | ( | OrtpLogFunc | func | ) |
func | your logging function, compatible with the OrtpLogFunc prototype. |
void ortp_set_log_level | ( | const char * | domain, |
OrtpLogLevel | level | ||
) |
Activate all log level greater or equal than specified level argument.
void ortp_set_log_level_mask | ( | const char * | domain, |
int | levelmask | ||
) |
@ param levelmask a mask of ORTP_DEBUG, ORTP_MESSAGE, ORTP_WARNING, ORTP_ERROR ORTP_FATAL .
void ortp_set_log_thread_id | ( | unsigned long | thread_id | ) |
Tell oRTP the id of the thread used to output the logs. This is meant to output all the logs from the same thread to prevent deadlock problems at the application level.
[in] | thread_id | The id of the thread that will output the logs (can be obtained using ortp_thread_self()). |