gchar* g_log_writer_format_fields ( GLogLevelFlags log_level, const GLogField* fields, gsize n_fields, gboolean use_color )
Format a structured log message as a string suitable for outputting to the
terminal (or elsewhere). This will include the values of all fields it knows
how to interpret, which includes
GLIB_DOMAIN (see the
documentation for g_log_structured()). It does not include values from
The returned string does not have a trailing new-line character. It is encoded in the character set of the current locale, which is not necessarily UTF-8.
Available since: 2.50
Log level, either from
GLogLevelFlags, or a user-defined level.
Type: An array of
Key–value pairs of structured data forming the log message.
The length of the array is specified in the
The data is owned by the caller of the function.
Number of elements in the
TRUEto use ANSI color escape sequences when formatting the message,