my ruby/rake daemon script logs to STDOUT. But thanks to systemd
, logs are available to rsyslog
.
systemd service:
[Unit]
Description=ruby rake daemon
[Service]
WorkingDirectory=/opt/rake/....
Type=simple
User=rake
Group=rake
ExecStart=/home/rake/.rbenv/shims/bundle exec rake ....
Restart=always
SyslogIdentifier=rake
ryslog conf /etc/rsyslog.d/rake.conf
:programname, isequal, "rake" /var/log/rake.log
& stop
It actually works but it buffers the data so log file is not updated right away when I tail it but it waits for a chunk of data (a few lines, it looks to me).
How do I disable buffering?