Skip to main content

Module journald

Module journald 

Source
Expand description

Native systemd journal submission and field recording.

The module routes formatted messages to the journal socket and records structured tracing fields for journal queries.

StructsΒ§

Entry
One entry, submitted when the writer is dropped. Its payload accumulates in the thread’s buffer, which the fields layer opened for this event.
Fields
Records the fields of each event and span for the entry the wrapped console layer is about to write, leaving them queryable with journalctl F_NAME=value.
Journal
Datagram connection to the journald submission socket.
SpanFields πŸ”’
Encoded fields of one span, held in its registry extensions.
Visitor πŸ”’

ConstantsΒ§

IDENTIFIER πŸ”’
LEN_PREFIX πŸ”’
NAME_MAX πŸ”’
Journald rejects a longer field name.
PAYLOAD πŸ”’
Entry under construction on this thread, reused across events.
PAYLOAD_MAX πŸ”’
Bounds the datagram well under the default socket send buffer.
PREFIX πŸ”’
Keeps a user field from colliding with one of the journal’s own.
SOCKET πŸ”’

FunctionsΒ§

boundary πŸ”’
Steps back to the nearest character boundary at or below len; a continuation byte never begins a character.
close πŸ”’
Seals the message field, trimming the formatter’s trailing whitespace and truncating on a character boundary what the datagram cannot carry.
enabled πŸ”’
Whether events are submitted to journald rather than written to the console, which journald otherwise captures at a single fixed priority.
extend_scope πŸ”’
Appends the fields of every span enclosing the event, innermost first.
fallback πŸ”’
Writes a message the socket would not take to the console, which journald captures in turn under systemd.
identifier πŸ”’
Tags entries with the running executable’s name.
priority πŸ”’
Maps a level onto the syslog severity code journald expects.
put πŸ”’
Appends a length-encoded field, which may carry any byte sequence.
record_event πŸ”’
Opens this thread’s buffer with the event’s fields and those of the spans enclosing it, for the entry the console writer appends to next.
record_span πŸ”’
Encodes a span’s fields once, for every event it later encloses.
record_values πŸ”’
Appends the fields of a span recorded after its creation.
sanitize πŸ”’
Journald accepts only uppercase alphanumerics and underscores in a field name, and drops a field whose name it rejects.

Type AliasesΒ§

Buffer πŸ”’
Encoded journal fields; a longer run spills to the heap.
CodeLine πŸ”’
Formatted source line number.
FieldName πŸ”’
Journal name of a user field, including the prefix.
FieldValue πŸ”’
Value of a user field recorded through its Debug implementation.
Identifier πŸ”’
Syslog identifier tagging every entry.