Testing out/learning runit. Seeking info on runits logging facility. This is a runit install from base.
I understand how to enable logging for a particular service (the log directory) and have that working fine. But not much, if anything gets logged.
Using openssh as an example. I have setup /etc/runit/sv/sshd/log/run:
#!/bin/sh
exec svlogd -tt /var/log/ssh
I added echo 2>&1 to /etc/runit/sv/sshd/run to try to get more log response:
#!/bin/sh
echo 2>&1
ssh-keygen -A >/dev/null 2>&1 # Will generate host keys if they don't already exist
[ -r conf ] && . ./conf
exec /usr/bin/sshd -D $OPTS
But nothing interesting gets logged:
/var/log/ssh/current:
2021-08-17_23:27:21.71413
2021-08-17_23:31:07.37343
The logged entries are probably when sshd is brought up. I have remotely logged into this sshd several times, including failed attempts, nothing is logged. Under an openrc based system, each attempted ssh login gets reported. How/can I get this detail of logging in runit?
You might want to check /var/log/messages (or whatever file is used by your syslog implementation), as that's where sshd sends logs by default.
svlogd only captures stderr (or stdout, i don't remember exactly) but messages can also be sent to syslog. To handle it you can install any syslog package or socklog
OK, understand syslog.
I mistakenly thought that runit somehow magically logged EVERYTHING to its logging facility.
Thanks!