si3t.ch> cd /

vger log to a separate file

2022-07-30T15:41:12Z

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
!vger:
*.*     /var/log/vger.log
EOF

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

[XHTML 1.1 valid] [CSS < 256B] [] [http/Tor]