-VLC_EXPORT( void, __msg_Generic, ( vlc_object_t *, int, const char *, const char *, ... ) );
-VLC_EXPORT( void, __msg_Info, ( void *, const char *, ... ) );
-VLC_EXPORT( void, __msg_Err, ( void *, const char *, ... ) );
-VLC_EXPORT( void, __msg_Warn, ( void *, const char *, ... ) );
-VLC_EXPORT( void, __msg_Dbg, ( void *, const char *, ... ) );
-
-#ifdef HAVE_VARIADIC_MACROS
-
-# define msg_Info( p_this, psz_format, args... ) \
- __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_INFO, MODULE_STRING, \
- psz_format, ## args )
-
-# define msg_Err( p_this, psz_format, args... ) \
- __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_ERR, MODULE_STRING, \
- psz_format, ## args )
-
-# define msg_Warn( p_this, psz_format, args... ) \
- __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_WARN, MODULE_STRING, \
- psz_format, ## args )
-
-# define msg_Dbg( p_this, psz_format, args... ) \
- __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_DBG, MODULE_STRING, \
- psz_format, ## args )
-
-#else /* HAVE_VARIADIC_MACROS */
+VLC_API void vlc_Log(vlc_object_t *, int,
+ const char *, const char *, ...) VLC_FORMAT( 4, 5 );
+VLC_API void vlc_vaLog(vlc_object_t *, int,
+ const char *, const char *, va_list);
+#define msg_GenericVa(a, b, c, d, e) vlc_vaLog(VLC_OBJECT(a), b, c, d, e)
+
+#define msg_Info( p_this, ... ) \
+ vlc_Log( VLC_OBJECT(p_this), VLC_MSG_INFO, MODULE_STRING, __VA_ARGS__ )
+#define msg_Err( p_this, ... ) \
+ vlc_Log( VLC_OBJECT(p_this), VLC_MSG_ERR, MODULE_STRING, __VA_ARGS__ )
+#define msg_Warn( p_this, ... ) \
+ vlc_Log( VLC_OBJECT(p_this), VLC_MSG_WARN, MODULE_STRING, __VA_ARGS__ )
+#define msg_Dbg( p_this, ... ) \
+ vlc_Log( VLC_OBJECT(p_this), VLC_MSG_DBG, MODULE_STRING, __VA_ARGS__ )
+
+/**
+ * Message logging callback signature.
+ * Accepts one private data pointer, the message, and an overrun counter.
+ */
+typedef void (*msg_callback_t) (void *, int, const msg_item_t *,
+ const char *, va_list);
+
+VLC_API msg_subscription_t *vlc_Subscribe(msg_callback_t, void *) VLC_USED;
+VLC_API void vlc_Unsubscribe(msg_subscription_t *);
+
+/**
+ * @}
+ */
+
+/**
+ * \defgroup statistics Statistics
+ *
+ * @{
+ */