VLC  3.0.21
Data Structures | Typedefs | Functions
messages.c File Reference
Include dependency graph for messages.c:

Data Structures

struct  vlc_logger_t
 
struct  vlc_log_early_t
 
struct  vlc_logger_early_t
 

Typedefs

typedef struct vlc_log_early_t vlc_log_early_t
 

Functions

static void vlc_vaLogCallback (libvlc_int_t *vlc, int type, const vlc_log_t *item, const char *format, va_list ap)
 
static void vlc_LogCallback (libvlc_int_t *vlc, int type, const vlc_log_t *item, const char *format,...)
 
void vlc_vaLog (vlc_object_t *obj, int type, const char *module, const char *file, unsigned line, const char *func, const char *format, va_list args)
 Emit a log message. More...
 
void vlc_Log (vlc_object_t *obj, int type, const char *module, const char *file, unsigned line, const char *func, const char *format,...)
 Emit a log message. More...
 
static void vlc_vaLogEarly (void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
 
static int vlc_LogEarlyOpen (vlc_logger_t *logger)
 
static void vlc_LogEarlyClose (vlc_logger_t *logger, void *d)
 
static void vlc_vaLogDiscard (void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
 
static int vlc_logger_load (void *func, va_list ap)
 
static void vlc_logger_unload (void *func, va_list ap)
 
int vlc_LogPreinit (libvlc_int_t *vlc)
 Performs preinitialization of the messages logging subsystem. More...
 
int vlc_LogInit (libvlc_int_t *vlc)
 Initializes the messages logging subsystem and drain the early messages to the configured log. More...
 
void vlc_LogSet (libvlc_int_t *vlc, vlc_log_cb cb, void *opaque)
 Sets the message logging callback. More...
 
void vlc_LogDeinit (libvlc_int_t *vlc)
 

Typedef Documentation

◆ vlc_log_early_t

Function Documentation

◆ vlc_LogCallback()

static void vlc_LogCallback ( libvlc_int_t vlc,
int  type,
const vlc_log_t item,
const char *  format,
  ... 
)
static

◆ vlc_LogDeinit()

void vlc_LogDeinit ( libvlc_int_t vlc)

Referenced by libvlc_InternalCleanup().

◆ vlc_LogEarlyClose()

static void vlc_LogEarlyClose ( vlc_logger_t logger,
void *  d 
)
static

Referenced by vlc_LogInit().

◆ vlc_LogEarlyOpen()

static int vlc_LogEarlyOpen ( vlc_logger_t logger)
static

Referenced by vlc_LogPreinit().

◆ vlc_logger_load()

static int vlc_logger_load ( void *  func,
va_list  ap 
)
static

< No error

< Unspecified error

Referenced by vlc_LogInit().

◆ vlc_logger_unload()

static void vlc_logger_unload ( void *  func,
va_list  ap 
)
static

Referenced by vlc_LogSet().

◆ vlc_LogInit()

int vlc_LogInit ( libvlc_int_t vlc)

Initializes the messages logging subsystem and drain the early messages to the configured log.

Returns
0 on success, -1 on error.

References libvlc_priv(), vlc_logger_t::lock, vlc_logger_t::log, libvlc_priv_t::logger, vlc_logger_t::module, vlc_logger_t::sys, unlikely, vlc_LogEarlyClose(), vlc_logger_load(), vlc_module_load, vlc_rwlock_unlock(), vlc_rwlock_wrlock(), vlc_vaLogDiscard(), and vlc_vaLogEarly().

Referenced by libvlc_InternalInit().

◆ vlc_LogPreinit()

int vlc_LogPreinit ( libvlc_int_t vlc)

Performs preinitialization of the messages logging subsystem.

Early log messages will be stored in memory until the subsystem is fully initialized with vlc_LogInit(). This enables logging before the configuration and modules bank are ready.

Returns
0 on success, -1 on error.

References libvlc_priv(), vlc_logger_t::lock, vlc_logger_t::log, libvlc_priv_t::logger, msg_Dbg, psz_vlc_changeset, unlikely, vlc_custom_create, vlc_LogEarlyOpen(), vlc_rwlock_init(), and vlc_vaLogDiscard().

Referenced by libvlc_InternalInit().

◆ vlc_vaLogCallback()

static void vlc_vaLogCallback ( libvlc_int_t vlc,
int  type,
const vlc_log_t item,
const char *  format,
va_list  ap 
)
static

Referenced by vlc_vaLog().

◆ vlc_vaLogDiscard()

static void vlc_vaLogDiscard ( void *  d,
int  type,
const vlc_log_t item,
const char *  format,
va_list  ap 
)
static

◆ vlc_vaLogEarly()

static void vlc_vaLogEarly ( void *  d,
int  type,
const vlc_log_t item,
const char *  format,
va_list  ap 
)
static

Referenced by vlc_LogInit().