Skip to content

Commit

Permalink
Feed 'journalctl' stderr into log stream
Browse files Browse the repository at this point in the history
Make errors from `journalctl` itself filterable by integrating its stdout into
stream of collected messages.

Useful for working around corrupted journal files.
  • Loading branch information
lynix committed Dec 6, 2022
1 parent 1dc7adb commit 3323775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion journalcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [ -r "$CURSOR_FILE" ]; then
else
ARGS+=" -b"
fi
journalctl $ARGS > "$LOG"
journalctl $ARGS &> "$LOG"
if [ $? -ne 0 ]; then
echo "Error: failed to dump system journal" >&2
exit 1
Expand Down

0 comments on commit 3323775

Please sign in to comment.