log to both stdout and file using tail

This commit is contained in:
BennyThink 2022-01-09 15:31:18 +08:00
parent 78e5002818
commit 555358540a
No known key found for this signature in database
GPG Key ID: 6CD0DBDA5235D481

View File

@ -4,14 +4,27 @@ logfile=/dev/null
logfile_maxbytes=0
user=root
[program:vnstat]
command=vnstatd -n
autorestart=true
[program:ytdl]
directory=/ytdlbot/ytdlbot/
command=python ytdl_bot.py
autorestart=true
priority=900
redirect_stderr=true
stdout_logfile_maxbytes = 50MB
stdout_logfile_backups = 2
stdout_logfile = /var/log/ytdl.log
[program:log]
command=tail -f /var/log/ytdl.log
autorestart=true
priority=999
redirect_stderr=true
stdout_logfile=/dev/fd/1