4.22 GLogFunc

Callback: GLogFunc

A procedure given for it is called as (procedure log-domain log-level message).

Specifies the prototype of log handler functions.

The default log handler, log-default-handler, automatically appends a new-line character to message when printing it. It is advised that any custom log handler functions behave similarly, so that logging calls in user code do not need modifying to add a new-line character to the message if the log handler is changed.

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

This is not used if structured logging is enabled; see Using Structured Logging.

log-domain

Passed: a string, or #f.

the log domain of the message

log-level

Passed: a <%GLogLevelFlags>.

the log level of the message (including the fatal and recursion flags)

message

Passed: a string.

the message to process

user-data

Not passed: it is the user data that guile-gi supplied.

user data, set in log-set-handler