writer_journald


Description:

[ Version ( since = "2.50" ) ]
[ 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 LogWriterFunc.

If GLib has been compiled without systemd support, this function is still defined, but will always return g_log_writer_unhandled.

Parameters:

fields

key–value pairs of structured data forming the log message

log_level

log level, either from LogLevelFlags, or a user-defined level

n_fields

number of elements in the fields array

user_data

user data passed to set_writer_func

Returns:

g_log_writer_handled on success, g_log_writer_unhandled otherwise


Namespace: GLib.Log
Package: glib-2.0