log_structured_array


Description:

[ Version ( since = "2.50" ) ]
public void log_structured_array (LogLevelFlags log_levels, LogField[] fields)

Log a message with structured data.

The message will be passed through to the log writer set by the application using [func@GLib.log_set_writer_func]. If the message is fatal ( i.e. its log level is [flags@GLib.LogLevelFlags.LEVEL_ERROR]), the program will be aborted at the end of this function.

See [func@GLib.log_structured] for more documentation.

This assumes that log_level is already present in fields (typically as the `PRIORITY` field).

Parameters:

fields

key–value pairs of structured data to add to the log message

log_level

log level, either from [type@GLib.LogLevelFlags], or a user-defined level

n_fields

number of elements in the fields array


Namespace: GLib
Package: glib-2.0