Debug Logging
Functions
wp_log_level_is_enabled
gboolean wp_log_level_is_enabled (GLogLevelFlags log_level)
Use this to figure out if a debug message is going to be printed or not, so that you can avoid allocating resources just for debug logging purposes
Parameters:
log_level
–
a log level
whether the log level is currently enabled
Wp.log_level_is_enabled
def Wp.log_level_is_enabled (log_level):
#python wrapper for 'wp_log_level_is_enabled'
Use this to figure out if a debug message is going to be printed or not, so that you can avoid allocating resources just for debug logging purposes
Parameters:
log_level
(
GLib.LogLevelFlags
)
–
a log level
whether the log level is currently enabled
Wp.prototype.log_level_is_enabled
function Wp.prototype.log_level_is_enabled(log_level: GLib.LogLevelFlags): {
// javascript wrapper for 'wp_log_level_is_enabled'
}
Use this to figure out if a debug message is going to be printed or not, so that you can avoid allocating resources just for debug logging purposes
Parameters:
log_level
(
GLib.LogLevelFlags
)
–
a log level
whether the log level is currently enabled
wp_log_structured_standard
wp_log_structured_standard (const gchar * log_domain, GLogLevelFlags log_level, const gchar * file, const gchar * line, const gchar * func, GType object_type, gconstpointer object, const gchar * message_format, ... ...)
Used internally by the debug logging macros. Avoid using it directly.
Parameters:
log_domain
–
log_level
–
file
–
line
–
func
–
object_type
–
object
–
message_format
–
...
–
wp_log_writer_default
GLogWriterOutput wp_log_writer_default (GLogLevelFlags log_level, const GLogField * fields, gsize n_fields, gpointer user_data)
WirePlumber's GLogWriterFunc
This is installed automatically when you call wp_init with WP_INIT_SET_GLIB_LOG set in the flags
Parameters:
log_level
–
fields
–
n_fields
–
user_data
–
Wp.log_writer_default
def Wp.log_writer_default (log_level, fields, n_fields, user_data):
#python wrapper for 'wp_log_writer_default'
WirePlumber's GLib.LogWriterFunc
This is installed automatically when you call Wp.init with Wp.InitFlags.SET_GLIB_LOG set in the flags
Parameters:
log_level
(
GLib.LogLevelFlags
)
–
fields
(
GLib.LogField
)
–
n_fields
(
int
)
–
user_data
(
object
)
–
Wp.prototype.log_writer_default
function Wp.prototype.log_writer_default(log_level: GLib.LogLevelFlags, fields: GLib.LogField, n_fields: Number, user_data: Object): {
// javascript wrapper for 'wp_log_writer_default'
}
WirePlumber's GLib.LogWriterFunc
This is installed automatically when you call Wp.prototype.init with Wp.InitFlags.SET_GLIB_LOG set in the flags
Parameters:
log_level
(
GLib.LogLevelFlags
)
–
fields
(
GLib.LogField
)
–
n_fields
(
Number
)
–
user_data
(
Object
)
–
wp_spa_log_get_instance
spa_log* wp_spa_log_get_instance ()
WirePlumber's instance of spa_log
, which can be used to redirect
PipeWire's log messages to the currently installed GLogWriterFunc.
This is installed automatically when you call wp_init with
WP_INIT_SET_PW_LOG set in the flags
Wp.spa_log_get_instance
def Wp.spa_log_get_instance ():
#python wrapper for 'wp_spa_log_get_instance'
WirePlumber's instance of spa_log
, which can be used to redirect
PipeWire's log messages to the currently installed GLib.LogWriterFunc.
This is installed automatically when you call Wp.init with
Wp.InitFlags.SET_PW_LOG set in the flags
Wp.prototype.spa_log_get_instance
function Wp.prototype.spa_log_get_instance(): {
// javascript wrapper for 'wp_spa_log_get_instance'
}
WirePlumber's instance of spa_log
, which can be used to redirect
PipeWire's log messages to the currently installed GLib.LogWriterFunc.
This is installed automatically when you call Wp.prototype.init with
Wp.InitFlags.SET_PW_LOG set in the flags
Function Macros
WP_OBJECT_ARGS
#define WP_OBJECT_ARGS(object) \ (object ? G_OBJECT_TYPE_NAME(object) : "invalid"), object
wp_critical
#define wp_critical(...) \ wp_log (G_LOG_LEVEL_CRITICAL, 0, NULL, __VA_ARGS__)
wp_critical_boxed
#define wp_critical_boxed(type, object, ...) \ wp_log (G_LOG_LEVEL_CRITICAL, type, object, __VA_ARGS__)
wp_critical_object
#define wp_critical_object(object, ...) \ wp_log (G_LOG_LEVEL_CRITICAL, (object) ? G_TYPE_FROM_INSTANCE (object) : G_TYPE_NONE, object, __VA_ARGS__)
wp_debug
#define wp_debug(...) \ wp_log (G_LOG_LEVEL_DEBUG, 0, NULL, __VA_ARGS__)
wp_debug_boxed
#define wp_debug_boxed(type, object, ...) \ wp_log (G_LOG_LEVEL_DEBUG, type, object, __VA_ARGS__)
wp_debug_object
#define wp_debug_object(object, ...) \ wp_log (G_LOG_LEVEL_DEBUG, (object) ? G_TYPE_FROM_INSTANCE (object) : G_TYPE_NONE, object, __VA_ARGS__)
wp_info
#define wp_info(...) \ wp_log (G_LOG_LEVEL_INFO, 0, NULL, __VA_ARGS__)
wp_info_boxed
#define wp_info_boxed(type, object, ...) \ wp_log (G_LOG_LEVEL_INFO, type, object, __VA_ARGS__)
wp_info_object
#define wp_info_object(object, ...) \ wp_log (G_LOG_LEVEL_INFO, (object) ? G_TYPE_FROM_INSTANCE (object) : G_TYPE_NONE, object, __VA_ARGS__)
wp_log
#define wp_log(level, type, object, ...) \ ({ \ if (G_UNLIKELY (wp_log_level_is_enabled (level))) \ wp_log_structured_standard (G_LOG_DOMAIN, level, __FILE__, \ G_STRINGIFY (__LINE__), G_STRFUNC, type, object, __VA_ARGS__); \ })
wp_message
#define wp_message(...) \ wp_log (G_LOG_LEVEL_MESSAGE, 0, NULL, __VA_ARGS__)
wp_message_boxed
#define wp_message_boxed(type, object, ...) \ wp_log (G_LOG_LEVEL_MESSAGE, type, object, __VA_ARGS__)
wp_message_object
#define wp_message_object(object, ...) \ wp_log (G_LOG_LEVEL_MESSAGE, (object) ? G_TYPE_FROM_INSTANCE (object) : G_TYPE_NONE, object, __VA_ARGS__)
wp_trace
#define wp_trace(...) \ wp_log (WP_LOG_LEVEL_TRACE, 0, NULL, __VA_ARGS__)
wp_trace_boxed
#define wp_trace_boxed(type, object, ...) \ wp_log (WP_LOG_LEVEL_TRACE, type, object, __VA_ARGS__)
wp_trace_object
#define wp_trace_object(object, ...) \ wp_log (WP_LOG_LEVEL_TRACE, (object) ? G_TYPE_FROM_INSTANCE (object) : G_TYPE_NONE, object, __VA_ARGS__)
wp_warning
#define wp_warning(...) \ wp_log (G_LOG_LEVEL_WARNING, 0, NULL, __VA_ARGS__)
wp_warning_boxed
#define wp_warning_boxed(type, object, ...) \ wp_log (G_LOG_LEVEL_WARNING, type, object, __VA_ARGS__)
wp_warning_object
#define wp_warning_object(object, ...) \ wp_log (G_LOG_LEVEL_WARNING, (object) ? G_TYPE_FROM_INSTANCE (object) : G_TYPE_NONE, object, __VA_ARGS__)
Constants
WP_LOG_LEVEL_TRACE
#define WP_LOG_LEVEL_TRACE (1 << G_LOG_LEVEL_USER_SHIFT)
Wp.LOG_LEVEL_TRACE
Wp.LOG_LEVEL_TRACE
WP_OBJECT_FORMAT
#define WP_OBJECT_FORMAT "<%s:%p>"
Wp.OBJECT_FORMAT
Wp.OBJECT_FORMAT
The results of the search are