Add mempool-logger script and syslog.conf configuration to log to it

This commit is contained in:
wiz 2020-10-13 19:15:44 +09:00
parent b98b979dc8
commit cbcfbe5b36
No known key found for this signature in database
GPG Key ID: A394E332255A6173
2 changed files with 10 additions and 0 deletions

7
production/mempool-logger Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
trap "" PIPE
while read input;do
if [ ! -z "${input}" ];then
echo "\`\`\`${input}\`\`\`" | /usr/local/bin/keybase chat send --nonblock mempool.syslog
fi
done

3
production/syslog.conf Normal file
View File

@ -0,0 +1,3 @@
local7.debug /var/log/mempool.debug
local7.info /var/log/mempool
local7.notice |/usr/local/bin/sudo -u mempool /usr/local/bin/mempool-logger