mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
test: use notice log level to make easily filter out logs from PID1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user