test: use notice log level to make easily filter out logs from PID1

This commit is contained in:
Yu Watanabe
2023-02-06 22:49:35 +09:00
parent ecf4be2952
commit 577a0fd59b
2 changed files with 2 additions and 1 deletions

View File

@@ -3,3 +3,4 @@ Description=Log filtering unit
[Service]
ExecStart=sh -c 'while true; do echo "Logging from the service, and ~more~"; sleep .25; done'
SyslogLevel=notice

View File

@@ -199,7 +199,7 @@ function run_service_and_fetch_logs() {
journalctl --sync
END=$(date '+%Y-%m-%d %T.%6N')
journalctl -q -u "$UNIT" -S "$START" -U "$END" | grep -Pv "systemd\[[0-9]+\]"
journalctl -q -u "$UNIT" -S "$START" -U "$END" -p notice
systemctl stop "$UNIT"
}