oRTP: logging.h File Reference

oRTP 4.5.0

Macros | Functions | Variables
logging.h File Reference

Logging API. More...

`#include <ortp/port.h>`
`#include "bctoolbox/logging.h"`

## Macros
#define | ORTP_LOG_DOMAIN BCTBX_LOG_DOMAIN
#define | ORTP_FATAL BCTBX_LOG_FATAL
#define | ORTP_ERROR BCTBX_LOG_ERROR
#define | ORTP_WARNING BCTBX_LOG_WARNING
#define | ORTP_MESSAGE BCTBX_LOG_MESSAGE
#define | ORTP_TRACE BCTBX_LOG_TRACE
#define | ORTP_DEBUG BCTBX_LOG_DEBUG
#define | ORTP_END BCTBX_LOG_END
#define | ORTP_LOGLEV_END BCTBX_LOG_LOGLEV_END
#define | OrtpLogLevel BctbxLogLevel
#define | OrtpLogFunc BctbxLogFunc
#define | ortp_logv_out bctbx_logv_out
#define | ortp_log_level_enabled(domain, level) (bctbx_get_log_level_mask(domain) & (level))
#define | ortp_logv bctbx_logv
#define | ortp_logv_flush bctbx_logv_flush
#define | ortp_set_log_level bctbx_set_log_level
#define | ortp_set_log_level_mask bctbx_set_log_level_mask
#define | ortp_get_log_level_mask bctbx_get_log_level_mask
#define | ortp_set_log_thread_id bctbx_set_log_thread_id
#define | ortp_debug(...)
#define | ortp_message bctbx_message
#define | ortp_warning bctbx_warning
#define | ortp_error bctbx_error
#define | ortp_fatal bctbx_fatal

## Functions
void | ortp_set_log_file (FILE *file)
void | ortp_set_log_handler (BctbxLogFunc func)
BctbxLogFunc | ortp_get_log_handler (void)
static ORTP_INLINE void const char | va_start (args, fmt)
| bctbx_logv (BCTBX_LOG_DOMAIN, lev, fmt, args)
| va_end (args)

## Variables
static ORTP_INLINE void const char * | fmt

## Detailed Description

Logging API.

## Macro Definition Documentation

## ◆ ortp_logv_flush

#define ortp_logv_flush bctbx_logv_flush

Flushes the log output queue. WARNING: Must be called from the thread that has been defined with ortp_set_log_thread_id().

## ◆ ortp_set_log_level

#define ortp_set_log_level bctbx_set_log_level

Activate all log level greater or equal than specified level argument.

## ◆ ortp_set_log_thread_id

#define ortp_set_log_thread_id bctbx_set_log_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.

Parameters

  [in] | thread_id | The id of the thread that will output the logs (can be obtained using ortp_thread_self()).

## Function Documentation

## ◆ ortp_set_log_file()

void ortp_set_log_file | ( | FILE * | file | ) |

Parameters

  file | a FILE pointer where to output the ortp logs.