g_log_set_handler_full (
  const gchar* log_domain,
  GLogLevelFlags log_levels,
  GLogFunc log_func,
  gpointer user_data,
  GDestroyNotify destroy


Like g_log_set_handler(), but takes a destroy notify for the user_data.

This has no effect if structured logging is enabled; see [Using Structured Logging][using-structured-logging].

Available since:2.46


log_domain const gchar*

The log domain, or NULL for the default “” application domain.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
log_levels GLogLevelFlags

The log levels to apply the log handler for. To handle fatal and recursive messages as well, combine the log levels with the G_LOG_FLAG_FATAL and G_LOG_FLAG_RECURSION bit flags.

log_func GLogFunc

The log handler function.

user_data gpointer

Data passed to the log handler.

destroy GDestroyNotify

Destroy notify for user_data, or NULL.

Return value

Returns: guint

The id of the new handler.