public string writer_format_fields (LogLevelFlags log_levels, LogField fields, bool 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 `MESSAGE` and `GLIB_DOMAIN` (see the documentation for log_structured). It does not include values from unknown fields.
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.
key–value pairs of structured data forming the log message
true to use ANSI color escape sequences when formatting the message, false to not
log level, either from LogLevelFlags, or a user-defined level
number of elements in the
string containing the formatted log message, in the character set of the current locale