#!/bin/bash
if [[ "$1" == '-h' || "$1" == '--help' ]] ; then
    cat <<EOF
usage: guardlog [node [node ...]]

Follow guardian logs in special X window.
If no node is specified all node logs will be followed.

To view past guardian logs, use the "guardctrl log" command.
EOF
    exit
fi
if [[ "$1" == '-x' ]] ; then
    shift
fi

exec xterm \
    -si -sk +sb \
    -geometry 150x80 \
    -bg DodgerBlue4 \
    -fg white \
    -fa Monospace \
    -fs 10 \
    -title "guardctrl: $*" \
    -e "python3 -u -m guardctrl log -n 1000 -f $*" \
    &
