2 of 5 added 61 characters in body

How do you configure runit logging

I am having trouble with setting service with proper logging using running. Here is a brief overview of files and scripts I created according to runit's documentation and other resources I found in the internt:

I am using runit under debian, hence:

/etc/service/test -> link to /etc/sv/test.

Under `/etc/sv/test:

$ ls /etc/sv/test
finish  log  run
$ ls /etc/sv/test/log
config  run

The scripts run and finish are pretty simple:

root@data1:/etc/sv/test $ cat /etc/sv/test/run

touch /tmp/pid
echo $$ > /tmp/pid

while true; do
    sleep 3
root@data1:/etc/sv/test $ cat /etc/sv/test/finish

kill `cat /tmp/pid`

And the logscript is also very easy:

cat /etc/sv/test/log/run

exec svlogd -t /var/log/test

The directory /var/log/test exists, and the service runs.

$ sv s test
run: test: (pid 11547) 536s; down: log: 1s, normally up, want up

But the log directory is empty ... What am I missing? Where is all the logging information ?


I also made sure all scripts are executable.