26 #ifndef VLC_MESSAGES_H_ 27 #define VLC_MESSAGES_H_ 80 const char *file,
unsigned line,
const char *func,
89 const
char *file,
unsigned line, const
char *func,
90 const
char *format, va_list ap);
92 #define msg_GenericVa(o, p, fmt, ap) \ 93 vlc_object_vaLog(VLC_OBJECT(o), p, vlc_module_name, __FILE__, __LINE__, \ 96 #define msg_Generic(o, p, ...) \ 97 vlc_object_Log(VLC_OBJECT(o), p, vlc_module_name, __FILE__, __LINE__, \ 98 __func__, __VA_ARGS__) 99 #define msg_Info(p_this, ...) \ 100 msg_Generic(p_this, VLC_MSG_INFO, __VA_ARGS__) 101 #define msg_Err(p_this, ...) \ 102 msg_Generic(p_this, VLC_MSG_ERR, __VA_ARGS__) 103 #define msg_Warn(p_this, ...) \ 104 msg_Generic(p_this, VLC_MSG_WARN, __VA_ARGS__) 105 #define msg_Dbg(p_this, ...) \ 106 msg_Generic(p_this, VLC_MSG_DBG, __VA_ARGS__) 108 extern const char vlc_module_name[];
123 const char *type,
const char *module,
124 const char *file,
unsigned line,
const char *func,
127 const
char *type, const
char *module,
128 const
char *file,
unsigned line, const
char *func,
129 const
char *format, va_list ap);
131 #define vlc_log_gen(logger, prio, ...) \ 132 vlc_Log(&(logger), prio, "generic", vlc_module_name, \ 133 __FILE__, __LINE__, __func__, __VA_ARGS__) 134 #define vlc_info(logger, ...) vlc_log_gen(logger, VLC_MSG_INFO, __VA_ARGS__) 135 #define vlc_error(logger, ...) vlc_log_gen(logger, VLC_MSG_ERR, __VA_ARGS__) 136 #define vlc_warning(logger, ...) vlc_log_gen(logger, VLC_MSG_WARN, __VA_ARGS__) 137 #define vlc_debug(logger, ...) vlc_log_gen(logger, VLC_MSG_DBG, __VA_ARGS__) 148 const char *fmt, va_list args);
153 void (*destroy)(
void *data);
Important information.
Definition: vlc_messages.h:47
vlc_log_type
Message types.
Definition: vlc_messages.h:45
void vlc_LogDestroy(struct vlc_logger *)
Destroys a message log.
Definition: messages.c:586
const char * func
Source code calling function name or NULL.
Definition: vlc_messages.h:64
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)
Definition: messages.c:85
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:140
Definition: vlc_messages.h:151
const char * psz_module
Emitter module (source code)
Definition: vlc_messages.h:60
Error.
Definition: vlc_messages.h:48
Debug.
Definition: vlc_messages.h:50
uintptr_t i_object_id
Emitter (temporarily) unique object ID or 0.
Definition: vlc_messages.h:58
struct vlc_log_t vlc_log_t
Log message.
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:131
const char * vlc_strerror(int)
Formats an error message in the current locale.
Definition: error.c:29
struct vlc_logger * vlc_LogHeaderCreate(struct vlc_logger *parent, const char *str)
Creates a prefixed message log.
Definition: messages.c:506
void(* vlc_log_cb)(void *data, int type, const vlc_log_t *item, const char *fmt, va_list args)
Message logging callback signature.
Definition: vlc_messages.h:148
Warning.
Definition: vlc_messages.h:49
int line
Source code file line number or -1.
Definition: vlc_messages.h:63
Definition: messages.c:54
#define VLC_API
Definition: fourcc_gen.c:31
const char * file
Source code file name or NULL.
Definition: vlc_messages.h:62
#define VLC_FORMAT(x, y)
String format function annotation.
Definition: vlc_common.h:141
const char * vlc_strerror_c(int)
Formats an error message in the POSIX/C locale (i.e.
Definition: error.c:34
const char * psz_object_type
Emitter object type name.
Definition: vlc_messages.h:59
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:156
unsigned long tid
Emitter thread ID.
Definition: vlc_messages.h:65
Log message.
Definition: vlc_messages.h:56
VLC object common members.
Definition: vlc_objects.h:43
#define VLC_USED
Definition: fourcc_gen.c:32
const char * psz_header
Additional header (used by VLM media)
Definition: vlc_messages.h:61