VLC  4.0.0-dev
Modules | Files | Data Structures | Macros | Typedefs | Enumerations | Functions | Variables

Message logs. More...

Collaboration diagram for Logging:

Modules

 Logger
 Message log back-end.
 

Files

file  vlc_messages.h
 

Data Structures

struct  vlc_log_t
 Log message. More...
 

Macros

#define msg_GenericVa(o, p, fmt, ap)
 
#define msg_Generic(o, p, ...)
 
#define msg_Info(p_this, ...)   msg_Generic(p_this, VLC_MSG_INFO, __VA_ARGS__)
 
#define msg_Err(p_this, ...)   msg_Generic(p_this, VLC_MSG_ERR, __VA_ARGS__)
 
#define msg_Warn(p_this, ...)   msg_Generic(p_this, VLC_MSG_WARN, __VA_ARGS__)
 
#define msg_Dbg(p_this, ...)   msg_Generic(p_this, VLC_MSG_DBG, __VA_ARGS__)
 

Typedefs

typedef struct vlc_log_t vlc_log_t
 Log message. More...
 

Enumerations

enum  vlc_log_type { VLC_MSG_INFO =0, VLC_MSG_ERR, VLC_MSG_WARN, VLC_MSG_DBG }
 Message types. More...
 

Functions

VLC_EXPORT void vlc_object_Log (vlc_object_t *obj, int prio, const char *module, const char *file, unsigned line, const char *func, const char *format,...)
 Emit a log message. More...
 
VLC_EXPORT void vlc_object_vaLog (vlc_object_t *obj, int prio, const char *module, const char *file, unsigned line, const char *func, const char *format, va_list ap)
 Emit a log message. More...
 
const VLC_EXPORT char * vlc_strerror (int)
 Formats an error message in the current locale. More...
 
const VLC_EXPORT char * vlc_strerror_c (int)
 Formats an error message in the POSIX/C locale (i.e. More...
 

Variables

const char vlc_module_name []
 
VLC_EXPORT void vlc_LogSet (libvlc_int_t *, const struct vlc_logger_operations *, void *data)
 Sets the message logging callback. More...
 

Detailed Description

Message logs.

Functions for modules to emit log messages.

Macro Definition Documentation

◆ msg_Dbg

#define msg_Dbg (   p_this,
  ... 
)    msg_Generic(p_this, VLC_MSG_DBG, __VA_ARGS__)

◆ msg_Err

#define msg_Err (   p_this,
  ... 
)    msg_Generic(p_this, VLC_MSG_ERR, __VA_ARGS__)

◆ msg_Generic

#define msg_Generic (   o,
  p,
  ... 
)
Value:
vlc_object_Log(VLC_OBJECT(o), p, vlc_module_name, __FILE__, __LINE__, \
__func__, __VA_ARGS__)

◆ msg_GenericVa

#define msg_GenericVa (   o,
  p,
  fmt,
  ap 
)
Value:
vlc_object_vaLog(VLC_OBJECT(o), p, vlc_module_name, __FILE__, __LINE__, \
__func__, fmt, ap)

◆ msg_Info

#define msg_Info (   p_this,
  ... 
)    msg_Generic(p_this, VLC_MSG_INFO, __VA_ARGS__)

◆ msg_Warn

#define msg_Warn (   p_this,
  ... 
)    msg_Generic(p_this, VLC_MSG_WARN, __VA_ARGS__)

Typedef Documentation

◆ vlc_log_t

typedef struct vlc_log_t vlc_log_t

Log message.

Enumeration Type Documentation

◆ vlc_log_type

Message types.

Enumerator
VLC_MSG_INFO 

Important information.

VLC_MSG_ERR 

Error.

VLC_MSG_WARN 

Warning.

VLC_MSG_DBG 

Debug.

Function Documentation

◆ vlc_LogSet()

VLC_EXPORT void vlc_LogSet ( libvlc_int_t vlc,
const struct vlc_logger_operations ops,
void *  opaque 
)

Sets the message logging callback.

Parameters
opsmessage callback, or NULL to clear
datadata pointer for the message callback

References discard_log, vlc_object_t::logger, libvlc_int_t::obj, vlc_logger::ops, vlc_LogExternalCreate(), vlc_LogSpam(), vlc_LogSwitch(), and VLC_OBJECT.

◆ vlc_object_Log()

VLC_EXPORT void vlc_object_Log ( vlc_object_t obj,
int  prio,
const char *  module,
const char *  file,
unsigned  line,
const char *  func,
const char *  format,
  ... 
)

Emit a log message.

Parameters
objVLC object emitting the message or NULL
typeVLC_MSG_* message type (info, error, warning or debug)
modulename of module from which the message come (normally vlc_module_name)
filesource module file name (normally FILE) or NULL
linefunction call source line number (normally LINE) or 0
funccalling function name (normally func) or NULL
formatprintf-like message format

References vlc_object_vaLog().

◆ vlc_object_vaLog()

VLC_EXPORT void vlc_object_vaLog ( vlc_object_t obj,
int  prio,
const char *  module,
const char *  file,
unsigned  line,
const char *  func,
const char *  format,
va_list  ap 
)

Emit a log message.

This function is the variable argument list equivalent to vlc_object_Log().

References vlc_object_t::logger, vlc_object_typename(), and vlc_vaLog().

Referenced by vlc_object_Log().

◆ vlc_strerror()

const VLC_EXPORT char* vlc_strerror ( int  errnum)

Formats an error message in the current locale.

Parameters
errnumerror number (as in errno.h)
Returns
A string pointer, valid until the next call to a function of the strerror() family in the same thread. This function cannot fail.

References vlc_strerror_c(), and vlc_strerror_l().

◆ vlc_strerror_c()

const VLC_EXPORT char* vlc_strerror_c ( int  errnum)

Variable Documentation

◆ vlc_module_name

const char vlc_module_name[]
vlc_object_vaLog
VLC_EXPORT void vlc_object_vaLog(vlc_object_t *obj, int prio, const char *module, const char *file, unsigned line, const char *func, const char *format, va_list ap)
Emit a log message.
Definition: objects.c:139
vlc_module_name
const char vlc_module_name[]
vlc_object_Log
VLC_EXPORT void vlc_object_Log(vlc_object_t *obj, int prio, const char *module, const char *file, unsigned line, const char *func, const char *format,...)
Emit a log message.
Definition: objects.c:155
VLC_OBJECT
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition: vlc_objects.h:70
p
#define p(t)