Function

GLiblog_set_handler_full

since: 2.46

Declaration [src]

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

Description [src]

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.

The log_domain parameter can be set to NULL or an empty string to use the default application domain.

Available since: 2.46

This function is renamed to g_log_set_handler() in language bindings.

Parameters

log_domain

Type: const gchar*

The log domain application domain.

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

Type: 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

Type: GLogFunc

The log handler function.

user_data

Type: gpointer

Data passed to the log handler.

The argument can be NULL.
The data is owned by the caller of the function.
destroy

Type: GDestroyNotify

Destroy notify for user_data, or NULL.

Return value

Type: guint

The ID of the new handler.