vger log to a separate file


Remember vger gemini server ? 🌐

While hacking vger's code, I wanted to improve logs.

Instead of hard coding a new option to specify a log file, which would be a pain because of chroot/unveil, I set up syslog to redirect vger's logs to /var/log/vger.log. I also wanter to avoid a neverending growing file so newsyslog is configured too.

touch /var/log/vger.log
chmod 640 /var/log/vger.log

cat << EOF >> /etc/syslog.conf
*.*     /var/log/vger.log

cat << EOF >> /etc/newsyslog.conf
/var/log/vger.log       644 5 300 * Z