Message logs.
More...
|
#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__) |
|
|
void | vlc_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...
|
|
void | vlc_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 char * | vlc_strerror (int) |
| Formats an error message in the current locale. More...
|
|
const char * | vlc_strerror_c (int) |
| Formats an error message in the POSIX/C locale (i.e. More...
|
|
Message logs.
Functions for modules to emit log messages.
◆ msg_Dbg
◆ msg_Err
◆ msg_Generic
#define msg_Generic |
( |
|
o, |
|
|
|
p, |
|
|
|
... |
|
) |
| |
◆ msg_GenericVa
#define msg_GenericVa |
( |
|
o, |
|
|
|
p, |
|
|
|
fmt, |
|
|
|
ap |
|
) |
| |
◆ msg_Info
◆ msg_Warn
◆ 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
-
data | data pointer as provided to vlc_msg_SetCallback(). |
type | message type (VLC_MSG_* values from enum vlc_log_type) |
item | meta information |
fmt | format string |
args | format string arguments |
◆ vlc_log_t
◆ vlc_log_type
Message types.
Enumerator |
---|
VLC_MSG_INFO | Important information.
|
VLC_MSG_ERR | Error.
|
VLC_MSG_WARN | Warning.
|
VLC_MSG_DBG | Debug.
|
◆ vlc_Log()
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.
- Parameters
-
obj | VLC object emitting the message or NULL |
type | VLC_MSG_* message type (info, error, warning or debug) |
module | name of module from which the message come (normally vlc_module_name) |
file | source module file name (normally FILE) or NULL |
line | function call source line number (normally LINE) or 0 |
func | calling function name (normally func) or NULL |
format | printf-like message format |
References vlc_vaLog().
◆ vlc_LogSet()
Sets the message logging callback.
- Parameters
-
cb | message callback, or NULL to clear |
data | data pointer for the message callback |
References libvlc_priv(), vlc_logger_t::lock, vlc_logger_t::log, libvlc_priv_t::logger, vlc_logger_t::module, msg_Dbg, psz_vlc_changeset, vlc_logger_t::sys, unlikely, vlc_logger_unload(), vlc_module_unload, vlc_rwlock_unlock(), vlc_rwlock_wrlock(), and vlc_vaLogDiscard().
◆ vlc_strerror()
const char* vlc_strerror |
( |
int |
errnum | ) |
|
Formats an error message in the current locale.
- Parameters
-
errnum | error 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 char* vlc_strerror_c |
( |
int |
errnum | ) |
|
Formats an error message in the POSIX/C locale (i.e.
American English).
- Parameters
-
errnum | error 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 _, wsaerrmsg_t::msg, vlc_strerror_l(), and wsaerrmsg.
Referenced by config_CreateDir(), config_LoadConfigFile(), config_OpenConfigFile(), config_SaveConfigFile(), ImageWriteUrl(), libvlc_InternalCleanup(), libvlc_InternalInit(), net_Accept(), net_Connect(), net_ConnectDgram(), net_Gets(), net_Listen(), net_ListenSingle(), net_OpenDgram(), net_Read(), net_SetMcastHopLimit(), net_SetMcastOut(), net_SetupDgramSocket(), net_SourceSubscribe(), net_Subscribe(), net_Write(), playlist_Export(), playlist_SaveArt(), vlc_h1_request(), vlc_stream_ReadLine(), vlc_strerror(), vlc_tls_SocketOpenTCP(), and vlc_tls_SocketOpenTLS().
◆ vlc_vaLog()
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.
This function is the variable argument list equivalent to vlc_Log().
References vlc_log_t::file, vlc_common_members::flags, vlc_log_t::func, vlc_log_t::i_object_id, vlc_common_members::libvlc, vlc_log_t::line, vlc_object_t::obj, OBJECT_FLAGS_QUIET, vlc_common_members::object_type, p, vlc_common_members::parent, vlc_log_t::psz_header, vlc_log_t::psz_module, vlc_log_t::psz_object_type, vlc_log_t::tid, vlc_thread_id(), and vlc_vaLogCallback().
Referenced by vlc_http_dbg(), vlc_http_err(), and vlc_Log().
◆ vlc_module_name
const char vlc_module_name[] |
void vlc_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: messages.c:152
void vlc_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: messages.c:87