gmessages: Clarify log_domain behavior in function descriptions

Move details about the `log_domain` parameter being `NULL` or an empty string
for the default application domain from argument descriptions to the main
function descriptions.

This ensures concise argument descriptions while providing a clear
explanation of exceptions in the function body.
This commit is contained in:
Roberto Leinardi 2024-12-05 17:12:36 +01:00
parent 1691657cb3
commit 78b4b66e9a
No known key found for this signature in database
GPG Key ID: DAB051957EF63750

View File

@ -658,7 +658,7 @@ g_log_set_fatal_mask (const gchar *log_domain,
/** /**
* g_log_set_handler: * g_log_set_handler:
* @log_domain: (nullable): the log domain, or `NULL` for the default `""` * @log_domain: (nullable): the log domain
* application domain * application domain
* @log_levels: the log levels to apply the log handler for. * @log_levels: the log levels to apply the log handler for.
* To handle fatal and recursive messages as well, combine * To handle fatal and recursive messages as well, combine
@ -680,6 +680,9 @@ g_log_set_fatal_mask (const gchar *log_domain,
* This has no effect if structured logging is enabled; see * This has no effect if structured logging is enabled; see
* [Using Structured Logging](logging.html#using-structured-logging). * [Using Structured Logging](logging.html#using-structured-logging).
* *
* The `log_domain` parameter can be set to `NULL` or an empty string to use the default
* application domain.
*
* Here is an example for adding a log handler for all warning messages * Here is an example for adding a log handler for all warning messages
* in the default domain: * in the default domain:
* *
@ -715,7 +718,7 @@ g_log_set_handler (const gchar *log_domain,
/** /**
* g_log_set_handler_full: (rename-to g_log_set_handler) * g_log_set_handler_full: (rename-to g_log_set_handler)
* @log_domain: (nullable): the log domain, or `NULL` for the default `""` * @log_domain: (nullable): the log domain
* application domain * application domain
* @log_levels: the log levels to apply the log handler for. * @log_levels: the log levels to apply the log handler for.
* To handle fatal and recursive messages as well, combine * To handle fatal and recursive messages as well, combine
@ -730,6 +733,9 @@ g_log_set_handler (const gchar *log_domain,
* This has no effect if structured logging is enabled; see * This has no effect if structured logging is enabled; see
* [Using Structured Logging](logging.html#using-structured-logging). * [Using Structured Logging](logging.html#using-structured-logging).
* *
* The `log_domain` parameter can be set to `NULL` or an empty string to use the default
* application domain.
*
* Returns: the ID of the new handler * Returns: the ID of the new handler
* *
* Since: 2.46 * Since: 2.46
@ -1128,7 +1134,7 @@ static GSList *expected_messages = NULL;
/** /**
* g_logv: * g_logv:
* @log_domain: (nullable): the log domain, or `NULL` for the default `""` * @log_domain: (nullable): the log domain
* application domain * application domain
* @log_level: the log level * @log_level: the log level
* @format: the message format. See the `printf()` documentation * @format: the message format. See the `printf()` documentation
@ -1146,6 +1152,9 @@ static GSList *expected_messages = NULL;
* *
* If [structured logging is enabled](logging.html#using-structured-logging) this will * If [structured logging is enabled](logging.html#using-structured-logging) this will
* output via the structured log writer function (see [func@GLib.log_set_writer_func]). * output via the structured log writer function (see [func@GLib.log_set_writer_func]).
*
* The `log_domain` parameter can be set to `NULL` or an empty string to use the default
* application domain.
*/ */
void void
g_logv (const gchar *log_domain, g_logv (const gchar *log_domain,