VLC 4.0.0-dev
Loading...
Searching...
No Matches
messages.c File Reference
Include dependency graph for messages.c:

Data Structures

struct  vlc_log_early_t
 Early (latched) message log. More...
struct  vlc_logger_early
struct  vlc_logger_switch
 Switchable message log. More...
struct  vlc_logger_module
 Module-based message log. More...
struct  vlc_logger_header
 Message log with "header". More...
struct  vlc_logger_external
 External custom log callback. More...

Typedefs

typedef struct vlc_log_early_t vlc_log_early_t
 Early (latched) message log.
typedef struct vlc_logger_early vlc_logger_early_t

Functions

static void vlc_LogSpam (vlc_object_t *obj)
static void vlc_vaLogCallback (vlc_logger_t *logger, int type, const vlc_log_t *item, const char *format, va_list ap)
static void vlc_LogCallback (vlc_logger_t *logger, int type, const vlc_log_t *item, const char *format,...)
void vlc_vaLog (struct vlc_logger *const *loggerp, int type, const char *typename, const char *module, const char *file, unsigned line, const char *func, const char *format, va_list args)
void vlc_Log (struct vlc_logger *const *logger, int type, const char *typename, const char *module, const char *file, unsigned line, const char *func, const char *format,...)
static void vlc_vaLogEarly (void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
static void vlc_LogEarlyClose (void *d)
static struct vlc_loggervlc_LogEarlyOpen (struct vlc_logger *logger)
static void vlc_vaLogDiscard (void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
static void vlc_LogDiscardClose (void *d)
static void vlc_vaLogSwitch (void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
static void vlc_LogSwitch (vlc_logger_t *logger, vlc_logger_t *new_logger)
static void vlc_LogSwitchClose (void *d)
static struct vlc_loggervlc_LogSwitchCreate (void)
static int vlc_logger_load (void *func, bool forced, va_list ap)
static void vlc_vaLogModule (void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
static void vlc_LogModuleClose (void *d)
static struct vlc_loggervlc_LogModuleCreate (vlc_object_t *parent)
void vlc_LogInit (libvlc_int_t *vlc)
 Initializes the messages logging subsystem and drain the early messages to the configured log.
int vlc_LogPreinit (libvlc_int_t *vlc)
 Performs preinitialization of the messages logging subsystem.
static void vlc_vaLogHeader (void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
struct vlc_loggervlc_LogHeaderCreate (struct vlc_logger *parent, const char *str)
 Creates a prefixed message log.
static void vlc_vaLogExternal (void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
static void vlc_LogExternalClose (void *d)
static struct vlc_loggervlc_LogExternalCreate (const struct vlc_logger_operations *ops, void *opaque)
void vlc_LogSet (libvlc_int_t *vlc, const struct vlc_logger_operations *ops, void *opaque)
 Sets the message logging callback.
void vlc_LogDestroy (vlc_logger_t *logger)
 Destroys a message log.

Variables

static const struct vlc_logger_operations early_ops
static const struct vlc_logger_operations discard_ops
static struct vlc_logger discard_log = { &discard_ops }
static const struct vlc_logger_operations switch_ops
static const struct vlc_logger_operations module_ops
static const struct vlc_logger_operations header_ops
static const struct vlc_logger_operations external_ops

Typedef Documentation

◆ vlc_log_early_t

typedef struct vlc_log_early_t vlc_log_early_t

Early (latched) message log.

A message log that stores messages in memory until another log is available.

◆ vlc_logger_early_t

Function Documentation

◆ vlc_LogCallback()

void vlc_LogCallback ( vlc_logger_t * logger,
int type,
const vlc_log_t * item,
const char * format,
... )
static

References vlc_vaLogCallback().

Referenced by vlc_LogEarlyClose().

◆ vlc_LogDiscardClose()

void vlc_LogDiscardClose ( void * d)
static

◆ vlc_LogEarlyClose()

void vlc_LogEarlyClose ( void * d)
static

◆ vlc_LogEarlyOpen()

◆ vlc_LogExternalClose()

void vlc_LogExternalClose ( void * d)
static

◆ vlc_LogExternalCreate()

struct vlc_logger * vlc_LogExternalCreate ( const struct vlc_logger_operations * ops,
void * opaque )
static

◆ vlc_logger_load()

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

◆ vlc_LogInit()

void vlc_LogInit ( libvlc_int_t * vlc)

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

References discard_log, vlc_LogModuleCreate(), vlc_LogSwitch(), and VLC_OBJECT.

Referenced by libvlc_InternalInit().

◆ vlc_LogModuleClose()

◆ vlc_LogModuleCreate()

struct vlc_logger * vlc_LogModuleCreate ( vlc_object_t * parent)
static

◆ 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 unlikely, vlc_LogEarlyOpen(), vlc_LogSpam(), vlc_LogSwitch(), vlc_LogSwitchCreate(), and VLC_OBJECT.

Referenced by libvlc_InternalInit().

◆ vlc_LogSpam()

void vlc_LogSpam ( vlc_object_t * obj)
static

References msg_Dbg, and psz_vlc_changeset.

Referenced by vlc_LogPreinit(), and vlc_LogSet().

◆ vlc_LogSwitch()

◆ vlc_LogSwitchClose()

void vlc_LogSwitchClose ( void * d)
static

◆ vlc_LogSwitchCreate()

struct vlc_logger * vlc_LogSwitchCreate ( void )
static

◆ vlc_vaLogCallback()

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

◆ vlc_vaLogDiscard()

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

◆ vlc_vaLogEarly()

◆ vlc_vaLogExternal()

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

◆ vlc_vaLogHeader()

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

◆ vlc_vaLogModule()

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

◆ vlc_vaLogSwitch()

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

Variable Documentation

◆ discard_log

◆ discard_ops

const struct vlc_logger_operations discard_ops
static
Initial value:
= {
}
static void vlc_LogDiscardClose(void *d)
Definition messages.c:268
static void vlc_vaLogDiscard(void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
Definition messages.c:262

◆ early_ops

const struct vlc_logger_operations early_ops
static
Initial value:
= {
}
static void vlc_LogEarlyClose(void *d)
Definition messages.c:222
static void vlc_vaLogEarly(void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
Definition messages.c:189

Referenced by vlc_LogEarlyOpen().

◆ external_ops

const struct vlc_logger_operations external_ops
static
Initial value:
= {
}
static void vlc_vaLogExternal(void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
Definition messages.c:507
static void vlc_LogExternalClose(void *d)
Definition messages.c:515

Referenced by vlc_LogExternalCreate().

◆ header_ops

const struct vlc_logger_operations header_ops
static
Initial value:
= {
free,
}
static void vlc_vaLogHeader(void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
Definition messages.c:463

Referenced by vlc_LogHeaderCreate().

◆ module_ops

const struct vlc_logger_operations module_ops
static
Initial value:
= {
}
static void vlc_LogModuleClose(void *d)
Definition messages.c:381
static void vlc_vaLogModule(void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
Definition messages.c:371

◆ switch_ops

const struct vlc_logger_operations switch_ops
static
Initial value:
= {
}
static void vlc_LogSwitchClose(void *d)
Definition messages.c:306
static void vlc_vaLogSwitch(void *d, int type, const vlc_log_t *item, const char *format, va_list ap)
Definition messages.c:290

Referenced by vlc_LogSwitch(), and vlc_LogSwitchCreate().