Skip to content

io.systemd.Journal

Journal control APIs

Property Value
Go package github.com/rossedman/sdvarlink/systemd/latest/journal
Socket /run/systemd/journal/io.systemd.journal
Available since systemd v257
Methods · types · errors 4 · 0 · 1

Methods

Synchronize

Write out all pending log messages out to disk, and reply only after that's complete.

func (c *Client) Synchronize(ctx context.Context, in SynchronizeIn) error

Parameters

Field Type Description
offline ?bool Controls whether to offline the journal files as part of the synchronization operation.

Rotate

Rotate journal files, i.e. close existing files, start new ones.

func (c *Client) Rotate(ctx context.Context) error

FlushToVar

Flush runtime logs to persistent logs, i.e. flush log data from /run/ into /var/, and continue writing future log data to the latter location.

func (c *Client) FlushToVar(ctx context.Context) error

RelinquishVar

Relinquish use of /var/ again, return to do runtime logging into /run/ only.

func (c *Client) RelinquishVar(ctx context.Context) error

Errors

Error Go type Description
NotSupportedByNamespaces NotSupportedByNamespacesError Journal service running as per-namespace instance, and requested operation is not supported for namespaced journal.