systemd/test/TEST-04-JOURNAL/TEST-04-JOURNAL.units/logs-filtering.service
Yu Watanabe 7faf8987ed test: sync journal in short-living services
This also adjusts LogLevelMax=.

Hopefully, this makes the test much stabler.
2024-06-01 22:25:50 +09:00

12 lines
355 B
Desktop File

[Unit]
Description=Log filtering unit
[Service]
Type=oneshot
ExecStart=sh -c 'echo "Logging from the service, and ~more~ foo bar"'
# If the service finishes extremely fast, journald cannot find the source of the
# stream. Hence, we need to call 'journalctl --sync' before service finishes.
ExecStart=journalctl --sync
SyslogLevel=notice
LogLevelMax=info