writer_journald
Description:
[ CCode ( delegate_target = false ) ]
public LogWriterFunc writer_journald
Format a structured log message and send it to the systemd journal as a set of key–value pairs.
All fields are sent to the journal, but if a field has length zero (indicating program-specific data) then only its key will be sent.
This is suitable for use as a [type@GLib.LogWriterFunc].
If GLib has been compiled without systemd support, this function is still defined, but will always return [enum@GLib.LogWriterOutput.UNHANDLED] .
Parameters:
fields |
key–value pairs of structured data forming the log message |
log_level |
log level, either from [type@GLib.LogLevelFlags], or a user-defined level |
n_fields |
number of elements in the |
user_data |
user data passed to [func@GLib.log_set_writer_func] |
Returns:
[enum@GLib.LogWriterOutput.HANDLED] on success, [enum@GLib.LogWriterOutput.UNHANDLED] otherwise |