Skip to content

io.systemd.JournalAccess

Journal log read APIs

Property Value
Go package github.com/rossedman/sdvarlink/systemd/latest/journalaccess
Socket /run/systemd/io.systemd.JournalAccess
Available since systemd v260
Methods · types · errors 1 · 0 · 2

Methods

GetEntries

streaming (requires more)

Retrieve journal log entries, optionally filtered by unit, priority, etc.

func (c *Client) GetEntries(ctx context.Context, in GetEntriesIn) iter.Seq2[*GetEntriesOut, error]

Parameters

Field Type Description
units ?[]string Show messages for the specified systemd units (e.g. ['foo.service']).
uid ?int UID to match user units for
userUnits ?[]string Show messages for the specified user units (e.g. ['foo.service']).
namespace ?string If specified, shows the log data of the specified namespace, otherwise the default namespace.
priority ?int Filter output by message priorities or priority ranges (i.e. between 0/'emerg' and 7/'debug')
limit ?int Maximum number of entries to return. Defaults to 100, capped at 10000.

Reply

Field Type Description
entry object The journal entry in flat JSON format, matching journalctl --output=json.

Errors

Error Go type Description
NoMatches NoMatchesError No matches found for specified unit patterns
NoEntries NoEntriesError No journal entries matched the specified filters.