void g_test_log_set_fatal_handler ( GTestLogFatalFunc log_func, gpointer user_data )
Installs a non-error fatal log handler which can be used to decide whether log messages which are counted as fatal abort the program.
The use case here is that you are running a test case that depends on particular libraries or circumstances and cannot prevent certain known critical or warning messages. So you install a handler that compares the domain and message to precisely not abort in such a case.
Note that the handler is reset at the beginning of any test case, so you have to set it inside each test function which needs the special behavior.
This handler has no effect on g_error messages.
This handler also has no effect on structured log messages (using
g_log_structured_array()). To change the fatal
behaviour for specific log messages, programs must install a custom log
writer function using
[Using Structured Logging][using-structured-logging].
The log handler function.
Data passed to the log handler.