/** \defgroup pw_log Logging * * \brief Logging functions of PipeWire * * Logging is performed to stdout and stderr. Trace logging is performed * in a lockfree ringbuffer and written out from the main thread as to not * block the realtime threads.
*/
/** * \addtogroup pw_log * \{
*/ /** The global log level */ externenum spa_log_level pw_log_level;
externstruct spa_log_topic *PW_LOG_TOPIC_DEFAULT;
/** Configure a logging module. This is usually done automatically * in pw_init() but you can install a custom logger before calling
* pw_init(). */ void pw_log_set(struct spa_log *log);
/** Get the log interface */ struct spa_log *pw_log_get(void);
/** Configure the logging level */ void pw_log_set_level(enum spa_log_level level);
/** Log a message for a topic */ void
pw_log_logt(enum spa_log_level level, conststruct spa_log_topic *topic, constchar *file, int line, constchar *func, constchar *fmt, ...) SPA_PRINTF_FUNC(6, 7);
/** Log a message for a topic */ void
pw_log_logtv(enum spa_log_level level, conststruct spa_log_topic *topic, constchar *file, int line, constchar *func, constchar *fmt, va_list args) SPA_PRINTF_FUNC(6, 0);
/** Log a message for the default topic */ void
pw_log_log(enum spa_log_level level, constchar *file, int line, constchar *func, constchar *fmt, ...) SPA_PRINTF_FUNC(5, 6);
/** Log a message for the default topic */ void
pw_log_logv(enum spa_log_level level, constchar *file, int line, constchar *func, constchar *fmt, va_list args) SPA_PRINTF_FUNC(5, 0);
/** Initialize the log topic. The returned topic is owned by the pipewire * context and the topic must not be modified or freed. * Do not use this function directly, use one of PW_LOG_TOPIC_* instead. * * \see PW_LOG_TOPIC_STATIC * \see PW_LOG_TOPIC_EXTERN * \see PW_LOG_TOPIC
*/ void
_pw_log_topic_new(struct spa_log_topic *topic);
/** * Declare a static log topic named \a var. The usual usage is: * \code * PW_LOG_TOPIC_STATIC(my_topic); * #define PW_LOG_TOPIC_DEFAULT my_topic * * void foo() { * pw_log_debug("bar"); * } * \endcode
*/ #define PW_LOG_TOPIC_STATIC(var, topic) \ staticstruct spa_log_topic var##__LINE__ = SPA_LOG_TOPIC(0, topic); \ staticstruct spa_log_topic *var = &(var##__LINE__)
/** * Declare a static log topic named \a var. * See \ref PW_LOG_TOPIC_STATIC for an example usage.
*/ #define PW_LOG_TOPIC_EXTERN(var) \ externstruct spa_log_topic *var
/** * Declare a static log topic named \a var. * See \ref PW_LOG_TOPIC_STATIC for an example usage.
*/ #define PW_LOG_TOPIC(var, topic) \ struct spa_log_topic var##__LINE__ = SPA_LOG_TOPIC(0, topic); \ struct spa_log_topic *var = &(var##__LINE__)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.