Skip to main content
Topic: svlogd not logging any output (Read 681 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

svlogd not logging any output

In the dnscrypt-proxy-runit package there is a logging script which should log to /var/log/dnscrypt-proxy
Once I made the folder and gave it the correct permissions, it populated with current and lock, which makes sense and is what I expected.

However, svlogd never actually writes to current.

Looking under ps waxl, I can see svlogd running fine. Good
I can also see the output of dnscrypt-proxy, but instead in the output of runsvdir (truncated below)
Code: [Select]
runsvdir -P /run/runit/service log: 3:58] [NOTICE] [publicarray-au] OK (DNSCrypt) - rtt:

the logging script that comes with the runit scripts:
Code: [Select]
#!/bin/sh
exec chpst -u dnscrypt:dnscrypt svlogd -t /var/log/dnscrypt-proxy

and still current is empty.
Anyone expereince this and know of a solution?

 

Re: svlogd not logging any output

Reply #1
Yes it needs some changes. Since logs won't be rotated to /var/log you need just 2 executable scripts in dnscrypt-proxy folder.
And stderr should be redirected to stdin with 2>&1.

# ls dnscrypt-proxy/
# log run

contents of run:
#!/bin/bash
exec dnscrypt-proxy -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml 2>&1

contents of log:
#!/bin/bash
[ -e /var/log/dnscrypt-proxy ] || mkdir /var/log/dnscrypt-proxy
exec svlogd -t /var/log/dnscrypt-proxy

Hope it helps.