diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-06 14:49:35 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-06 14:50:03 +0100 |
commit | 577a0fd59bf8fdf533bc8d120e350fe8a3f040bf (patch) | |
tree | 922705119c2a9d1e24244b9b7e097bbc74eef124 | |
parent | NEWS: adjust commas, avoid double negative (diff) | |
download | systemd-577a0fd59bf8fdf533bc8d120e350fe8a3f040bf.tar.xz systemd-577a0fd59bf8fdf533bc8d120e350fe8a3f040bf.zip |
test: use notice log level to make easily filter out logs from PID1
-rw-r--r-- | test/testsuite-04.units/logs-filtering.service | 1 | ||||
-rwxr-xr-x | test/units/testsuite-04.sh | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/test/testsuite-04.units/logs-filtering.service b/test/testsuite-04.units/logs-filtering.service index fc89021ca9..06210868fd 100644 --- a/test/testsuite-04.units/logs-filtering.service +++ b/test/testsuite-04.units/logs-filtering.service @@ -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 diff --git a/test/units/testsuite-04.sh b/test/units/testsuite-04.sh index 2874fc778f..d10a9afbf7 100755 --- a/test/units/testsuite-04.sh +++ b/test/units/testsuite-04.sh @@ -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" } |