VLC 4.0.0-dev
Loading...
Searching...
No Matches

Message log back-end. More...

Collaboration diagram for Logger:

Data Structures

struct  vlc_logger_operations
 

Macros

#define vlc_log_gen(logger, prio, ...)
 
#define vlc_info(logger, ...)   vlc_log_gen(logger, VLC_MSG_INFO, __VA_ARGS__)
 
#define vlc_error(logger, ...)   vlc_log_gen(logger, VLC_MSG_ERR, __VA_ARGS__)
 
#define vlc_warning(logger, ...)   vlc_log_gen(logger, VLC_MSG_WARN, __VA_ARGS__)
 
#define vlc_debug(logger, ...)   vlc_log_gen(logger, VLC_MSG_DBG, __VA_ARGS__)
 

Typedefs

typedef void(* vlc_log_cb) (void *data, int type, const vlc_log_t *item, const char *fmt, va_list args)
 Message logging callback signature.
 

Functions

void vlc_Log (struct vlc_logger *const *logger, int prio, const char *type, const char *module, const char *file, unsigned line, const char *func, const char *format,...)
 
void vlc_vaLog (struct vlc_logger *const *logger, int prio, const char *type, const char *module, const char *file, unsigned line, const char *func, const char *format, va_list ap)
 
struct vlc_loggervlc_LogHeaderCreate (struct vlc_logger *parent, const char *str)
 Creates a prefixed message log.
 
void vlc_LogDestroy (struct vlc_logger *)
 Destroys a message log.
 

Detailed Description

Message log back-end.

Macro Definition Documentation

◆ vlc_debug

#define vlc_debug (   logger,
  ... 
)    vlc_log_gen(logger, VLC_MSG_DBG, __VA_ARGS__)

◆ vlc_error

#define vlc_error (   logger,
  ... 
)    vlc_log_gen(logger, VLC_MSG_ERR, __VA_ARGS__)

◆ vlc_info

#define vlc_info (   logger,
  ... 
)    vlc_log_gen(logger, VLC_MSG_INFO, __VA_ARGS__)

◆ vlc_log_gen

#define vlc_log_gen (   logger,
  prio,
  ... 
)
Value:
vlc_Log(&(logger), prio, "generic", vlc_module_name, \
__FILE__, __LINE__, __func__, __VA_ARGS__)
void vlc_Log(struct vlc_logger *const *logger, int prio, const char *type, const char *module, const char *file, unsigned line, const char *func, const char *format,...)
Definition messages.c:160
const char vlc_module_name[]

◆ vlc_warning

#define vlc_warning (   logger,
  ... 
)    vlc_log_gen(logger, VLC_MSG_WARN, __VA_ARGS__)

Typedef Documentation

◆ vlc_log_cb

typedef void(* vlc_log_cb) (void *data, int type, const vlc_log_t *item, const char *fmt, va_list args)

Message logging callback signature.

Parameters
datadata pointer as provided to vlc_LogSet().
typemessage type (VLC_MSG_* values from enum vlc_log_type)
itemmeta information
fmtformat string
argsformat string arguments

Function Documentation

◆ vlc_Log()

void vlc_Log ( struct vlc_logger *const *  logger,
int  prio,
const char *  type,
const char *  module,
const char *  file,
unsigned  line,
const char *  func,
const char *  format,
  ... 
)

References vlc_vaLog().

◆ vlc_LogDestroy()

void vlc_LogDestroy ( struct vlc_logger logger)

Destroys a message log.

References vlc_logger_operations::destroy, and vlc_logger::ops.

Referenced by libvlc_InternalCleanup(), and vlc_clock_main_Delete().

◆ vlc_LogHeaderCreate()

struct vlc_logger * vlc_LogHeaderCreate ( struct vlc_logger parent,
const char *  str 
)

Creates a prefixed message log.

This creates a message log that prefixes all its messages and forwards them in another log.

Parameters
parentmessage log to inject into
strnul-terminated prefix (a.k.a. "header")
Returns
a new message log on success or NULL on error

References vlc_logger_header::header, header_ops, vlc_logger_header::parent, and unlikely.

Referenced by vlc_clock_main_New().

◆ vlc_vaLog()

void vlc_vaLog ( struct vlc_logger *const *  logger,
int  prio,
const char *  type,
const char *  module,
const char *  file,
unsigned  line,
const char *  func,
const char *  format,
va_list  ap 
)