StandardOutput=append

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a backup script that runs periodically via cron. Instead of mailing me a large log, I wanted to have it append to a log file that can be rotated and compressed by logrotate. So I removed my link from /etc/cron.hourly and created service and timer units.

My first cut at writing a log file was to use the append option to StandardOutput:

[Service]
ExecStart=/home/Mirror/rsync-Saruman.sh
StandardOutput=append:/var/log/rsync-Saruman.log

In /var/log/messages I see:

Failed to parse output specifier, ignoring: append:/var/log/rsync-Saruman.log

<https://www.freedesktop.org/software/systemd/man/systemd.exec.html>

Based on some hints at the following link, I think I'll change this to use syslog and add an rsyslog config file to redirect to the desired file. But I wanted to find out why the append feature doesn't work.

<https://stackoverflow.com/questions/37585758/how-to-redirect-output-of-systemd-service-to-a-file>

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux