mirror of
https://github.com/systemd/systemd.git
synced 2026-08-10 01:48:09 +00:00
We already have some varlink support for the journal to perform some actions like `Rotate`. It would be nice to be able to query the journal via varlink too so this commit adds a new varlinkctl based journal service that exposes a single GetEntries() call to retrieve journal entries. Basic filtering is supported and we can expand the API as needed. This is a separate `io.systemd.JournalControl` [1] service from the existing `io.systemd.Journald` to decouple read and write (thanks to Lennart for suggesting this). This also extracts some shared helper so that we do not duplicate code when generating the json or when adding the filters. [1] The name mirrors the bootctl->io.systemd.BootControl naming.
24 lines
688 B
SYSTEMD
24 lines
688 B
SYSTEMD
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Journal Log Access Socket
|
|
Documentation=man:journalctl(1)
|
|
DefaultDependencies=no
|
|
Before=sockets.target
|
|
|
|
[Socket]
|
|
ListenStream=/run/systemd/io.systemd.JournalAccess
|
|
Symlinks=/run/varlink/registry/io.systemd.JournalAccess
|
|
FileDescriptorName=varlink
|
|
SocketGroup=systemd-journal
|
|
SocketMode=0660
|
|
Accept=yes
|
|
MaxConnectionsPerSource=16
|